On Windows 2000, select Search → For Files or Folders from the Start menu.
Now you'll be able to search for a particular file or folder name (use * as the wildcard) or enter one or more words to search within text-based files.
Select the drive, drives, or folder you want to search.
Click the Search button (or Search Now on Windows 2000).
Below the Search button, you can select additional advanced search options, which allows you to search based on file timestamp, file size, and various file attributes.
> where net*.exe
You can also use where to
find files in a specific folder or tree of folders. This command
finds all .vbs scripts whose
names contain the letters
> where /r c:\scripts *foo*.vbs
Windows comes with two other tools you can use to search for
files that contain a certain string: find.exe and findstr.exe. The latter is more robust.
If you only need to find the files in the current directory that
contain the letters
log, you can
use this command:
> findstr log *
This next command performs a case-insensitive search (/i) for all nonbinary files (/p) on the d: drive (/s) that contain the text "confidential" (/c):
> findstr /s /p /i /c:"confidential" d:\*
findstr includes some regular expression support. For a list of all the features, look at the command help information (findstr /?).
If you want to search for strings within binary files, take a look at the Sysinternals strings.exe command. The following command displays any text strings contained in binary files within the Program Files directory:
> strings -s "c:\program files"