Avatar of deklinm
deklinm
Flag for United States of America asked on

Batch File Copy Files and Sub-Folders Help

I need to create a batch file that will backup/copy the entire contents of my Marketing Directory.  My marketing directory contains files and sub-directories with files.  I have used xcopy in the past but it is not picking up any of the sub-directories or their contents.  In the end i would like a batch file to copy the entire directory structure as it is.
Windows Batch

Avatar of undefined
Last Comment
honestman31

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
honestman31

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
honestman31

@Echo Off 
xcopy c:\source d:\target /s/e
exit 

Open in new window


s means for sub-directories ( recursive )
e means even empty directory
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy