Link to home
Start Free TrialLog in
Avatar of Asatoma Sadgamaya
Asatoma SadgamayaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

dos command to copy and paste excel files by overwriting the same file names

Hi

I am in search for dos command which I need to include in the batch file. The code I am looking for is to copy excel files from a Upload folder and paste it in the archive sub folder(which sits in Upload folder). Each time I run batch file, it should copy files from Upload folder and paste in archive folder. If the files with same name exist inside archive folder, the dos command should over write only those files with latest files, leaving other files as they are.

Hope you get my point.

Any questions please let me know.

Thank you
Avatar of NVIT
NVIT
Flag of United States of America image

RoboCopy is the easiest solution. Can you use that?
ASKER CERTIFIED SOLUTION
Avatar of Asatoma Sadgamaya
Asatoma Sadgamaya
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your requirement was: ...command should over write only those files with latest files, leaving other files as they are

Your solution copies all files, regardless if they exist or not.

robocopy skips existing files.