2

I am using a recording program to record clips of games, and the program I am using records full sessions with the full session recording files being saved MKV files in my F:\Videos\Clips folder. After editing/cutting the full session recordings into clips of the moments I want to save, it saves them as .mp4 files.

However, it also sorts all my full session recordings and edited clips by the specific game, so for example recording "Escape From Tarkov", the recordings/edits will be in F:\Videos\Clips\EscapeFromTarkov, and for "League of Legends" they will be in F:\Videos\Clips\LeagueOfLegends.

This is my current batch file I have to move the edited clips (with task manager running it every time I start my pc/whenever my pc has been on for 4 hours+):

(at symbol)Echo Off
Set "source=F:\Videos\Clips"
Set "destination=F:\Videos\Cut Clips"
%__AppDir__%Robocopy.exe "%source%" "%destination%" "*.mp4" /Mov
Exit /B

Now the issue is that this isn't moving the .mp4 files as they are all inside different sub-directories which are inside of the parent folder which is F:\Videos\Clips.

How can I get it to look inside each of the sub-directories that are inside F:\Videos\Clips for the .mp4 files to move?

1 Answer 1

3

You are missing the copy option /s to copy from subdirectories. The file pattern might also be an issue if you're using double quotes. Try the following:

@Echo Off
Set "source=F:\Videos\Clips"
Set "destination=F:\Videos\Cut Clips"
robocopy.exe "%source%" "%destination%" *.mp4 /Mov /s
Exit /B
2
  • the double quote marks on the set lines should not be around the variable names. ie. you should have set source="F:\Video\Clips" instead of set "source=F:\Video\Clips" Commented Jan 7 at 6:03
  • Thank you, it works perfectly now! Don't know how I missed such a simple fix haha. I appreciate the help!
    – Dpas_23
    Commented Jan 8 at 8:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .