Copy folders
Moderator: DosItHelp
-
- Posts: 6
- Joined: 01 Jul 2011 16:38
Copy folders
Hi this is my first post obviously. I am trying to copy all the folders and sub folders from one location to another. I am having no luck. I am very new to batch. Can someone please help me?
Re: Copy folders
Ed Diarrhea wrote:Hi this is my first post obviously. I am trying to copy all the folders and sub folders from one location to another. I am having no luck. I am very new to batch. Can someone please help me?
For copying folders and subfolders you need to use XCOPY, not COPY.
-
- Posts: 6
- Joined: 01 Jul 2011 16:38
Re: Copy folders
Hi thank you can give example please. I know not xcopy. sorry english is bad for me
Re: Copy folders
Ed Diarrhea wrote:Hi thank you can give example please. I know not xcopy. sorry english is bad for me
Code: Select all
mkdir newfolder
xcopy /e folder1 newfolder
The "/e" will make sure to copy all files and directories even if they are empty. I don't think this automatically creates a new directory, so that's why I used "mkdir" to create a new directory to copy the contents of the other one in.
So basically, this copies folder1 to newfolder.