DOS bat
I want to find files with a certain extension, for example
where /R c:\ *.ppx
and move them all to a specified directory, for example c:\PPS
Thanks!
Asked
Active
Viewed 325 times
0
-
1You can have a look at this [old question](http://stackoverflow.com/questions/5588264/batch-command-to-move-files-to-a-new-directory) – sleepsort Dec 09 '12 at 07:10
2 Answers
0
Redirect the output of WHERE
to a file
WHERE /R C:\ *.ppx > ppxlist.txt
And then use a FOR
loop to move them
FOR /f %i in (ppxlist.txt) do move %i c:\pps\

Ken White
- 123,280
- 14
- 225
- 444
0
Here's a similar question that suggests a few methods:
How can I recursively copy files of a specific pattern into a single flat folder on Windows?