When doing an XCOPY, I got Access Denied!


I was copying an old "multimedia CD" to the hard disk underneath C:\MJLAM when the CD failed. The thing had fingerprints and scratches on it.

So after cleaning it, I put it back in an did another XCOPY and got "Access Denined". The problem was that the incomplete file had been left as "Read Only".

Here's the experiment and results:

C:\MJLAM\PWS\CH7\x>attrib +r ..\bad.mov

C:\MJLAM\PWS\CH7\x>attrib ..
A          C:\MJLAM\PWS\CH7

C:\MJLAM\PWS\CH7\x>attrib ..\bad.mov
A    R     C:\MJLAM\PWS\CH7\bad.mov

C:\MJLAM\PWS\CH7\x>dir bad.mov
 Volume in drive C has no label.
 Volume Serial Number is C060-49F3

 Directory of C:\MJLAM\PWS\CH7\x

10/18/1995  05:37a           4,056,039 bad.mov
               1 File(s)      4,056,039 bytes
               0 Dir(s)  63,806,021,632 bytes free

C:\MJLAM\PWS\CH7\x>xcopy /f /c /s . ..
Overwrite C:\MJLAM\PWS\CH7\bad.mov (Yes/No/All)? y
C:\MJLAM\PWS\CH7\x\bad.mov -> C:\MJLAM\PWS\CH7\bad.mov

Access denied

0 File(s) copied C:\MJLAM\PWS\CH7\x>

The fix

C:\MJLAM\PWS\CH7\x>attrib ../bad.mov
A    R     C:\MJLAM\PWS\CH7\bad.mov

C:\MJLAM\PWS\CH7\x>attrib -r ../bad.mov

C:\MJLAM\PWS\CH7\x>xcopy /f /c /s . .. Overwrite C:\MJLAM\PWS\CH7\bad.mov (Yes/No/All)? Y C:\MJLAM\PWS\CH7\x\bad.mov -> C:\MJLAM\PWS\CH7\bad.mov 1 File(s) copied C:\MJLAM\PWS\CH7\x>

Comment: Sometimes you forget... :-)


Access_Denied_during_xcopy.html