copying all contents of folder to another folder using batch file?

SCM picture SCM · Jan 5, 2011 · Viewed 392.2k times · Source

I have a folder in C:\Folder1

I want to copy all the contents of Folder1 to another location, D:\Folder2

How do I do this using a batch file?

Answer

eHussain picture eHussain · Jan 5, 2011

xcopy.exe is the solution here. It's built into Windows.

xcopy /s c:\Folder1 d:\Folder2

You can find more options at http://www.computerhope.com/xcopyhlp.htm