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.
Things You'll 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.
- Photo Credit BananaStock/BananaStock/Getty Images
What Are Folders & Subfolders?
Microsoft Windows is an operating system that requires a keyboard and a mouse for proper use. You move the mouse to move...
How to Copy and Paste MS-DOS Text
If you are using the "Command Prompt" window, it can be helpful to copy and paste MS-DOS text. For example, you might...
How to Share Files & Folders With DOS Commands
Windows is a complicated operating system and doesn't always work flawlessly, which means you may have to work around some weaknesses to...
How to Copy & Paste the Files in DOS
DOS, or Disk Operating System, is a software tool that allows you to access and make commands directly to a computer's hardware....
How to Sync Folders With XCopy
XCopy is a utility within Windows that has the ability to copy folders and files from one location to another. It is...