How to Copy Shared Folders Without Losing Share Permissions
By Jeff Grundy
In Windows, you can create shared folders that allow access to files from computers connected to the same network. Each user on the network has at least one shared folder he can use to share files with all other workgroup users. Usually, if you copy or drag and drop a shared folder to another location, it inherits the permissions and properties of the drive or folder to which you copy it. To copy shared folders without losing attributes or share permissions, you must use the XCOPY command in Windows.
Press "Windows-E" to launch File Explorer and then browse to the shared folder you want to copy. Right-click the shared folder and then click "Properties" on the pop-up menu.
Click the "Security" tab and select "Advanced." Click the "Permissions" tab, and then click "Disable Inheritance." In the pop-up window that opens, click "Convert inherited permissions into explicit permissions on this object."
Press the "Windows-X" keys and then click select "Command Prompt (Admin)" on the pop-up menu. Select "Yes" if a User Account Control prompt appears. An elevated command prompt window opens.
Enter the "CD" command to switch to the parent directory of the shared folder you want to copy. For instance, if the shared folder that you want to copy is "C:\Documents\Shared\Shared_Docs," first enter "C:" at the command prompt and press "Enter." Next, type "cd \documents\shared" and press "Enter" again. When entering the "CD" command, don’t forget the space between the "cd" and the "\" symbol.
Type the following command at the prompt and press the "Enter" key:
XCOPY shared_docs C:\newfolder\ /E/H/K/O/X
Change the "shared_docs" variable to the actual name of the shared folder to copy. Change "C:\newfolder\" to the drive letter and destination folder where you want to copy the shared folder.
When using the XCOPY command, the "/E" switch copies directories and subdirectories -- even empty ones. The "/H" switch copies hidden and system files; "/K" copies attributes; "/O" copies file ownership and ACL settings; and "/X" copies audit settings.
The above procedure works only with folders on NTFS volumes. Folders on drives formatted with the FAT32 format do not support NTFS file permissions.
Jeff Grundy has been writing computer-related articles and tutorials since 1995. Since that time, Grundy has written many guides to using various applications that are published on numerous how-to and tutorial sites. Born and raised in South Georgia, Grundy holds a Master of Science degree in mathematics from the Georgia Institute of Technology.