im using this command:
for /R C:\testfrom %%F in (*.zip) do @copy "%%F" C:\testto
and i want to search all the subdirectories and copy all the zip files and put them in one folder (no subfolders) and overwrite any files that are older.
the above command works in my batch file but will overwrite newer items in the target directory. i believe its a /D option I need to put in somewhere, but i don't know where. i figured it would go at the end of the line, but that didn't seem to do it. any help would be appreciated.
copy newer files to specific folder
Moderator: DosItHelp
Re: copy newer files to specific folder
i guess it does. i changed the copy to xcopy and added the /D and /Y and it works now