How to create a batch file that will copy all files within a subfolder that has a constantly changing name?

Viewed 25

I have video software that creates a temp directory to burn the video files to CD. I wish to create a batch file that will copy the files and place them onto USB. There are two issues that I have:

  1. The software creates a temp directory within a folder called "Video" with a name based on the date/time of the video file that means this directory name is always changing.
  2. Within that temp directory it creates a second directory named exactly the same as the original temp directory and then puts the files within the second directory.

I need to copy the second temp directory folder over to a USB drive. This means I cannot simply do an

xcopy C:\VideoPlayer\Video

type of code as I need to go another level deeper with a constantly changing folder name

xcopy C:\VideoPlayer\Video[RandomTempFolderName][Needthisfolder] U:

0 Answers
Related