Getting access denied on the destination drive partition after using xcopy

1

I wanted to copy the all the files in a folder including its sub-folders from one hard drive to another

I tried this xcopy command

C:\Documents and Settings\rakesh>xcopy "D:\Ganesh Drive\Trimax soft important" "
H:\" /E /k /x

but after executing this command I am getting access denied on the destination drive partition. Please let me why and how rectify this issue.

Ganesh Dake

Posted 2013-06-09T17:07:00.870

Reputation: 21

Your question shows the second parameter to xcopy as " (space) H : \ ".  If that’s what you’re doing, try eliminating the space between the quote and the H.         ...         And, if you don't have any spaces in that directory pathname, you don't need the quotes. – Scott – 2013-06-11T00:24:00.343

Answers

2

I know this is long time ago, but since I had the same problem from the same kind of command (xcopy targeting a volume root with /x), I thought about sharing the solution.

This appears to be a bug in xcopy (Windows XP SP3 version 5.1.2600.5512 at least), where the root directory entry ”.” of the target directory gets its ACL erased.

Fixed it with ”CACLS [drive letter:] /g Everyone:F”.

Red_Blue

Posted 2013-06-09T17:07:00.870

Reputation: 21

1

I have tried command prompt elevation, all possible switches with the xcopy command and had zero luck in copying the encrypted files (these files are highlighted in green )

After some googling, i was able to come up with a solution...the answer is robocopy and it works like a charm . This took a day's R&D

The switch that does this job is /EFSRAW . It copies all encrypted files in EFS RAW mode.

Your command would be something like

robocopy source destination /COPY:DATS /MIR /EFSRAW /R:2 /W:0 /E /ETA

Note - Robocopy is not an inbuilt feature in 2003 servers. It has to be installed separately. Also certain ESI files and certificates have to be imported to get the /EFSRAW switch to work in 2003 servers. This is not required on 2008, Vista and w7 servers.

Benly Walter

Posted 2013-06-09T17:07:00.870

Reputation: 11