I want to write a batch script that searches ONLY local drives (like
the search commabnd) and look for a specfic file call *.bak
Can somebody show me a command that can get me a list of local drives
and how to
iterate through each drive in a loop looking for a file called *.bak.
Note: I don't want to hard code the drives since there a lot of
machines I want to run
this batch file on. Using the search command is too time consuming and
want to be
able to copy only specific files therefore I would like the output for
each drive to be
appended to a file.
I need something like
for drive c: e: f:
dir $drive / *.bak >> c:/tmp/output.txt
than loop through each file system looking for a file *.bak.
Note: I want to have the output of all drives placed into a single file