hey folks, hopefully this is a simple one for you all, i'm new to DOS/command line interface after creating a directory how can you copy it to another drive for example can you copy one folder and its contents from c drive to d drive (c:\newfolder1\newfolder2\newfolder3\ can you copy newfolder3 to d:\)if so what command should i use?
Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Page 1 of 1
Copying Folders In Dos
#2
Posted 24 February 2007 - 02:33 PM
If you want to copy over a directory along with all of its subdirectories, the xcopy command is what you want. Say you have C:\Backup and it has folders within it like \pictures, \music, etc., and you want to copy all of its contents over to D:\ Through DOS you use XCOPY [source] [destination] [and desired switch options] In this case we want the subdirectories copied along with the base folder, so we would use the /S switch, (and possibly the /E switch if you want to also copy any empty subdirectories). So in this case you would first make another Backup folder in D:\. So: MKDIR D:\Backup
Then the command to copy would be: XCOPY C:\Backup D:\Backup /S
For more on XCOPY go to the command prompt and type in XCOPY /?
Then the command to copy would be: XCOPY C:\Backup D:\Backup /S
For more on XCOPY go to the command prompt and type in XCOPY /?
#3
Posted 24 February 2007 - 02:47 PM
thanks, i wasn't aware that you had to create the folder on the new drive before you can copy it i thought it would work similar to cut and paste, thanks for your help
#4
Posted 14 September 2009 - 04:33 PM
sorry 2 revive this old topic, but i have the same issue !
I noted that the Xcopy command copies the contents of the folder without the folder itself ! why is this ?
although if there were sub-folders they would be copied as they are (the same hierarchy )
tnx 4 u..
I noted that the Xcopy command copies the contents of the folder without the folder itself ! why is this ?
although if there were sub-folders they would be copied as they are (the same hierarchy )
tnx 4 u..
Share this topic:
Page 1 of 1

Help

Back to top










