Xcopy Does Not Copy Attributes for Folders

This article was previously published under Q133351
This article has been archived. It is offered "as is" and will no longer be updated.
When you use Xcopy to copy a folder, the source folder's attributes arenot applied to the new folder.
Xcopy does not have the ability to copy attributes for folders.
To work around this problem, use either of the following methods:
  • Manually set the attributes for the new folder using Attrib.exe at an MS-DOS prompt. For example, the following command sets a folder's read-only attribute:

    attrib +r <foldername>
  • Manually set the attributes for the folder using Windows Explorer. To do so, follow these steps:

    1. Start Windows Explorer.
    2. Use the right mouse button to click the new folder, then click Properties on the menu that appears.
    3. Click the attributes you want to set.
    4. Click OK.
  • Use "xcopy /K" to indicate that file and folder attributes should bepropagated to the target files and folders.

    NOTE: This method requires Microsoft Windows 95 OEM Service Release 2 (OSR2) or later.

Article ID: 133351 - Last Review: 01/11/2015 01:02:09 - Revision: 1.2

Microsoft Windows 95, Microsoft Windows 98 Standard Edition

  • kbnosurvey kbarchive kbprb KB133351