Using xcopy to safely copy (and verify) files from one drive to another

I recently upgraded my “data” drive from a 3TB to a WD Black 6TB Performance Desktop Hard Disk Drive – 7200 RPM SATA 6 Gb/s 128MB Cache 3.5 Inch drive.

Once I had both drives installed in the computer, it was time to copy data.

Head over to: Start Menu -> All Programs -> Accessories -> Command Prompt. Right click on it, and choose “Run as administrator”


xcopy f:\ e:\ /f /h /i /j /o /s /v /x 1>>c:\xferlog.txt 2>&1

xcopy source [destination] [/a] [/b] [/c] [/d [:date]] [/e] [/f] [/g] [/h] [/i] [/j] [/k] [/l] [/m] [/n] [/o] [/p] [/q] [/r] [/s] [/t] [/u] [/v] [/w] [/x] [/y] [/-y] [/z] [/exclude:file1[+file2][+file3]…] [/?]

/f = This option will display the full path and file name of both the source and destination files being copied.

/h = The xcopy command does not copy hidden files or system files by default but will when using this option.

/i = Use the /i option to force xcopy to assume that destination is a directory. If you don’t use this option, and you’re copying from source that is a directory or group of files and copying to destination that doesn’t exist, the xcopy command will prompt you enter whether destination is a file or directory.

/j = This option copies files without buffering, a feature useful for very big files.

/o = Retains ownership and Access Control List (ACL) information in the files written in destination.

/s = Use this option to copy directories, subdirectories, and the files contained within them, in addition to the files in the root of source. Empty folders will not be recreated.

/v = This option verifies each file as its written, based on its size, to make sure they’re identical. Verification was built in to the xcopy command beginning in Windows XP so this option does nothing in later versions of Windows and is only included for compatibility with older MS-DOS files.

/x = This option copies file audit settings and System Access Control List (SACL) information. You imply /o when you use the /x option.

Leave a Reply

Your email address will not be published. Required fields are marked *