Moving files from all subdirectories to a single directory

pushd c:\images
   for /r %%a in (*.*) do (
     MOVE "%%a" "c:\single\%%~nxa"
   )
popd

Adapted from http://stackoverflow.com/a/11721037 .

How useful was this post?

Click on a star to rate it!

One thought on “Moving files from all subdirectories to a single directory

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.