This PATHEXT expansion applies even if you are not searching for an executable. WHERE will use the PATHEXT variable to include all executable files, so WHERE robocopy will find the location of robocopy. The WHERE command is particularly useful to reveal multiple versions of the same comand/script/utility on the system PATH. Unlike the DIR command WHERE always returns the full path to each file found. The WHERE command can either perform a recursive search within one directory ( /R) or search through a list of folders ( Path Path:), but not both.īy default, WHERE searches the current directory and the paths specified in the PATH environment variable. Path One or more semicolon-separated paths to search. The pattern can also be $ ENV: Pattern where ENV is an existing environment variable ![]() You can use wildcard characters ( ? * ) and UNC paths. Pattern The Drive\Directory\file, or set of files to be found. T Display the size, time stamp, and date stamp of the file. F Display the output file name in quotation marks. Q Don’t display the files but return either an exit code of 0 for success R A recursive search, starting with the specified Dir directory. By default, the search is done in the current directory and in the PATH. ![]() The WHERE command is roughly equivalent to the UNIX 'which' command. Locate and display files in a directory tree.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |