DOS file content search command

DOS file content search command

Command, enter this in the main directory of your search.

for /F "usebackq" %i in (`dir /b /s *.asp`) do find /N "John Wayne" %i >> searchresult.txt

Where you change the following values to make your search:

*.asp with the type of files you want to search through, e.g. *.* (all files), *.txt (all text files).

“John Wayne” with the search term you want to search for within the files.

searchresult.txt with the file you would like to save your result in.

Tags:

Leave a Reply