3 DOS commands for file searching

First command  - to find occurrences of \\B2 in text files.

 

findstr \\B2 *.txt

 

 Second command – this is to find which files has the XYZ filename.

 

 dir d: |findstr XYZ

 

 Third command – this is to copy files in current directory to d:\temp which has XYZ as filename.

 

for %c in (*XYZ*) do copy /y "%c" "d:\Temp"

 

All three commands can be executed in DOS mode.


 


 

Published Wednesday, November 14, 2007 11:16 AM by darenhan
Powered by Community Server (Commercial Edition), by Telligent Systems