I'm trying to use a .bat file to go into a folder, and take all photos within it and its subfolders, and place them all into another directory. I know how to copy the folder exactly, with all subfolders remaining in place when copied with
@ECHO OFF
XCOPY E:\FromFolderNameX C:\toFolderNameY /m /y
but I only want all of the photos to be in one folder in the end, no subfolders. Can this be done with a batch file?