Finding Files and Directories with the Where Utility
The Dir command provides you with a directory listing based on simple command line switches
and wildcard characters. It??™s done the job for many years and is probably still the command of
choice when you need to perform most file searches. The Where utility adds complex pattern
matching to the search. The purpose of this command is to augment the features that Dir already
provides. This command uses the following syntax:
WHERE [/R dir] [/Q] [/F] [/T] pattern...
The following list describes each of the command line arguments.
/R Searches all of the subfolders for a given pattern starting from the specified directory. This
option works the same as the /S command line switch used with other versions of Windows.
/Q Performs the search in quiet mode. The utility only returns the exit code of the search. The
valid exit codes include:
? 0: Search is successful
? 1: Search is unsuccessful
? 2: Other failures (such an incorrect syntax) caused the search to fail
/F Displays the matched filename in double quotes. This feature makes it easier to parse the
output when you place it in a file using redirection, rather than display it on screen.
Pages:
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985