Search code examples
batch-filemove

Batch script for moving files in different folders within a directory


What i need is for the script to sweep the folders within a folder and pick up certain files and move them all to one destination folder.

MOVE C:\Users\AAA\Movies\**\*.mkv C:\Users\AAA\Move

**= scan through folders and move all mkv files is what I wanted.

I'm new to batch scripting and i was hoping the * would scan through the folders, but i guess it isn't that easy. Any help would be appreciated.


Solution

  • ... and move them all to one destination folder ...

    Try and adapt as needed

    FORFILES /P "c:\Users\AAA\Movies" /S /M *.mkv /C "cmd /c move @path C:\Users\AAA\Move"