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

Asatoma Sadgamaya
Asatoma Sadgamaya used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
NVITEnd-user support

Commented:
RoboCopy is the easiest solution. Can you use that?
Commented:
copy "source\*.xlsx* "destination\
NVITEnd-user support

Commented:
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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial