Batch file to run xcopy without overwriting existing files

I’ve been using the following flags for years. It seems to accomplish all the behaviors you describe in the question.

xcopy s:\ z:\ /S /Y /D

S will copy all subfolders and files within them
Y prevents any overwrite prompts
D essentially copies anything newer than what is already in the destination

Leave a Comment