0

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!

  • 1
    You 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 Answers2

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
  • 120,522
  • 13
  • 212
  • 426
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?

Community
  • 1
  • 1
PeterJ
  • 3,586
  • 22
  • 50
  • 67