If you have had to troubleshoot or back up files from a failed computer, you are likely to be familiar with the DOS copy command. The copy command creates a copy of a file, or all files in a folder, moving the copy (or copies) to the destination of your choice. However, using the copy command, you must manually copy the files from any subfolders beneath the first. This process is tedious and easy to do incorrectly. Most versions of DOS eliminate this problem by including the "xcopy" command, which can copy the contents of a folder and all subfolders beneath it. Use the xcopy command to back up a folder and its subfolders in DOS.
- Skill level:
- Moderately Easy
Other People Are Reading
Things you need
- MS-DOS 3.3 and later
- Windows 95 and later
Type "cd C:\" after booting the computer to a DOS prompt or opening a command prompt in Windows. Press "Enter." This command moves you to the root directory of the primary hard drive. If you have already created a folder to transfer files into, skip to Step 3.
Type "md backup" and press "Enter." This command creates a folder called "backup." This is the folder that the folder structure you are backing up will be copied into.
Type "xcopy /e (source folder)*. (destination folder)" and press "Enter." The full path to each folder must be used. For example, if the files and subfolders that you wanted to copy were located in "c:\work\files," and you created a folder with the same name and path as described in Steps 1 and 2, type "xcopy /e c:\work\files*. c:\backup" and hit "Enter." This command copies the complete folder structure, along with all files contained within, to the second folder.
Tips and warnings
- Do not include quotation marks in the commands.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for