XCOPY - copy entire directories in MS-DOS

| | Comments (0)

To copy entire directories in MS-DOS, use the XCOPY command. For example, the following command

XCOPY c:\photos d:\ /s /e /c /h

will copy the "photos" directory from C drive to D drive. The nice part about the "/c" option is that it will keep copying the files even if some of them are corrupted. Please see the links below for detailed information about the options:

- Microsoft TechNet
- Wikipedia

The reason I searched for the XCOPY command is that I was backing up files from one network drive to another. And I realized that using the Windows based copy command was cumbersome because several of the files I was copying were corrupted. As a result, I was having to manually examine which files were not copied and copy them again. This was consuming a lot of time for me. The XCOPY syntax given above worked like a breeze. It copied the entire folder and ignored the files which were corrupted. In Unix/Linux, you would achieve the same by using the "cp -ap" command. More Unix/Linux commands are here.

Categories




Leave a comment

About this Entry

This page contains a single entry by Bobby published on March 7, 2007 2:35 AM.

Macedonia - first Wi-Fi country was the previous entry in this blog.

Set paragraph indentations in Powerpoint 2003 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0