Discussion Locked

Batch Files

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there a way to copy the contents of an entire folder (including sub-folders, loose files etc.) from a source to a destination using a batch file. For instance, if I want to copy the folder C:\Folder1 to D:\Folder2, I want to copy ALL of the datain folder1, including files, sub-folders etc. When I use the COPY command in the batch file, all I get copied is the files in Folder1, not any of the sub-folders in Folder1, or the data contained in them.

Thanks,

Jimmy

2 replies

by balbs

Try XCOPY. Type xcopy /?|more at the dos prompt to get the optional parameters (/e will get both full subdirs and empty subdirs). You can also use the /m option to make an auto-backup utility for only the files that have changed. Depending on the OS, you might have xcopy32 as well. Good Luck!

This discussion is closed to new replies.