Erm fi you know cmd please cast your eyes over the text.
Its so annoying trying to get this .bat script right
I am trying to make a search that will check the entire driver and all its sub directories for a "string" and a *.exe..
Find "string" *.exe
how do I get it to check all directories within a directory e.g c:
also anyone know how to copy whole directories correctly.
The Dreaded .bat
The Dreaded .bat
Programming Blog: http://www.uberwolf.com
/r walks the directory tree rooted at [drive:]path, type "for /?" in the prompt for more help on using it.
This list occurences of "test" in all textfiles recursively from current directory.
If you do this directly from the command-line you'll have to change %%i to %i.
Edit:
For your copy problem, check xcopy, type "xcopy /?" at the prompt for info.
Code: Select all
for /r %%i in (*.txt) do find "test" %%i
If you do this directly from the command-line you'll have to change %%i to %i.
Edit:
For your copy problem, check xcopy, type "xcopy /?" at the prompt for info.