where

検索パターンに一致するファイルの場所を表示

Where - ファイルの場所の一覧表示


where

  • C:\Windows\system32\where.exe /?

Output:


WHERE [/R ディレクトリ] [/Q] [/F] [/T] パターン...

説明:
    検索パターンに一致するファイルの場所を表示します。
    既定では、現在のディレクトリおよび PATH 環境変数によって指定された
    パス内を検索します。

パラメーター一覧:
    /R       指定したパターンに一致するファイルを、指定したディレクトリから
             開始して再帰的に検索し表示します。

    /Q       一致したファイルの一覧を表示せずに、終了コード
             のみを返します (Quiet モード)。

    /F       一致したファイル名を二重引用符内に表示します。

    /T       一致したすべてのファイルのサイズ、最終変更日および時刻を
             表示します。

    パターン ファイルの検索パターンを指定します。パターンには
             ワイルドカードである * および ? を使用することができます。
             "$env:pattern""path:pattern" 形式で指定する
             こともできます。"env" は環境変数で、"env" 環境
             変数で指定されたパスで検索が行われます。これら
             の形式は /R スイッチと同時には使用できません。
             パターンに PATHEXT 変数の拡張子を追記して
             検索を実行することもできます。

     /?      このヘルプを表示します。

  注意: このツールは、検索に成功するとエラー レベル 0 を、
        成功しなかった場合は 1 を、失敗またはエラーの場合は
        2 を返します。

:
    WHERE /?
    WHERE myfilename1 myfile????.*
    WHERE $windir:*.*
    WHERE /R c:\windows *.exe *.dll *.bat 
    WHERE /Q ??.???
    WHERE "c:\windows;c:\windows\system32:*.dll"
    WHERE /F /T *.dll

WHERE [/R dir] [/Q] [/F] [/T] pattern...

Description:
    Displays the location of files that match the search pattern.
    By default, the search is done along the current directory and
    in the paths specified by the PATH environment variable.

Parameter List:
    /R       Recursively searches and displays the files that match the
             given pattern starting from the specified directory.

    /Q       Returns only the exit code, without displaying the list
             of matched files. (Quiet mode)

    /F       Displays the matched filename in double quotes.

    /T       Displays the file size, last modified date and time for all
             matched files.

    pattern  Specifies the search pattern for the files to match.
             Wildcards * and ? can be used in the pattern. The
             "$env:pattern" and "path:pattern" formats can also be
             specified, where "env" is an environment variable and
             the search is done in the specified paths of the "env"
             environment variable. These formats should not be used
             with /R. The search is also done by appending the
             extensions of the PATHEXT variable to the pattern.

     /?      Displays this help message.

  NOTE: The tool returns an error level of 0 if the search is
        successful, of 1 if the search is unsuccessful and
        of 2 for failures or errors.

Examples:
    WHERE /?
    WHERE myfilename1 myfile????.*
    WHERE $windir:*.*
    WHERE /R c:\windows *.exe *.dll *.bat 
    WHERE /Q ??.???
    WHERE "c:\windows;c:\windows\system32:*.dll"
    WHERE /F /T *.dll

Return Code: 0


C:\Windows\system32\where.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
FileInfo
File Size43008bytes
Creation Time2019/12/07 18:09:51
LastWrite Time2019/12/07 18:09:51
ProductVersion10.0.19041.1889
FileVersion10.0.19041.1889 (WinBuild.160101.0800)
HashValue
MD53cf958b0f63fb1d74f7fcfe14b039a58
SHA137db3a31ae73538b9887f6e537f17cf49bbc3e3c
SHA224c8c0670a544965588edec89dd009ab7d46f2e3f9cca6e12e63893112
SHA256a19f7b783bc5611095d577f5eccc12069ca2b5e92bbe37f415429bb72c09792c
SHA384ac0875d4e96ab610032eb01c7ae27f5a96fce83673bf935aca9c6d20abf9ff5cb52e1f478f1f63532e242a6fe8d37b57
SHA5127dae44cc54b59a951d1f93e3426b76dd27fe88cfb374d0cd8861af8d4cde1116673829a8877de70f27f4c5a3877db728d64e9a968ebea55359b1addb9173a6a4
Built with Hugo
テーマ StackJimmy によって設計されています。