I assume this is for backing up or similar. If so, I made a bat file and Scheduled tasks runs it once a week.
Try making a bat file.
Open notepad and type
xcopy "file location" "file destination" /i /e /y /z
eg
xcopy "c:\allmusic\mp3\" "e:\music\" /i /e /y /z
Save the file as .bat (eg "copyFiles.bat")
You can have multiple lines but one per line. EG
xcopy "c:\allmusic\mp3\" "e:\music\" /i /e /y /z
xcopy "c:\allmusic\wav\" "e:\music\" /i /e /y /z
xcopy "c:\allmusic\wmv\" "e:\music\" /i /e /y /z
Please note, the /i
/y
/e
and /z
have meanings which may be desirable or not (such as overwriting), see a list here:
/A Copies only files with the archive attribute set, doesn't change the attribute.
/M Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V Verifies each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attribute
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y Causes prompting to confirm you want to overwrite an existing destination file.
/Z Copies networked files in restartable mode.
You can also use "move" which is similar to cut and paste
eg
move "source" "destination"
move "c:\allmusic\mp3\" "e:\music\" /i /e /y /z
move "c:\allmusic\wav\" "e:\music\" /i /e /y /z
move "c:\allmusic\wmv\" "e:\music\" /i /e /y /z
EDIT
To copy various folders by looping through, try
for /f %%f in ('dir /b c:\') do (
cd\
cd %%f
copy *.mp3 "e:\music"
for /f %%g in ('dir /b %%f') do (
cd\
cd %%g
copy *.mp3 "e:\music"
for /f %%h in ('dir /b %%g') do (
cd\
cd %%h
copy *.mp3 "e:\music"
pause
)
)
)
Note, this does 3 levels of subfolders