HOW TO: Remove the Read-Only Attribute While You Copy Files from a CD-ROM in Windows 2000 (323002)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

This article was previously published under Q323002

SUMMARY

This article describes how to remove the read-only attribute while you copy files from a CD-ROM.

When you copy files to a recordable CD-ROM, the read-only attribute is typically set for the files on the CD-ROM. When you use Windows Explorer to restore the files from the CD-ROM to the hard disk, the read-only attribute remains set for the files. Therefore, you cannot edit the files unless you manually clear the read-only attribute for the files.

Additionally, if certain types of files remain read-only, the programs that are associated with those files may not start. For example, if you restore a Microsoft Outlook personal folders (.pst) file from a CD-ROM and you do not clear the read-only attribute, Outlook may not start, and you may receive the following error message:
Cannot start Microsoft Outlook. File access is denied. You do not have the permission required to access the file.
You can either manually clear the read-only attribute from the restored files, or you can remove the read-only attribute while you copy the files from a CD-ROM.

back to the top

Remove the Read-Only Attribute While Copying Files

You can use the xcopy command to remove the read-only attribute while you are copying files from a CD-ROM. Xcopy.exe resets the read-only attributes unless you specify otherwise by using the /k switch (this switch copies attributes). To use this method:
  1. Click Start, and then click Run.
  2. In the Open box, type cmd, and then click OK.
  3. Type xcopy drive letter:\*.* destination /e /h, where drive letter is the CD-ROM drive letter and destination is the path to the destination for the files, and then press ENTER. For more information about command-line switches for Xcopy.exe, type xcopy /? at a command prompt.
back to the top

Manually Remove the Read-Only Attribute from a File

To manually remove the read-only attribute from a file:
  1. in Windows Explorer, right-click the file that you want to change, and then click Properties.
  2. On the General tab, click to clear the Read Only check box.
  3. Click OK.
back to the top

Modification Type:MajorLast Reviewed:11/20/2003
Keywords:kbhowto kbHOWTOmaster KB323002 kbAudITPro