Solved

Can I copy a folder's user permissions along with the data contained in it?

Posted on 2006-10-22
5
320 Views
Last Modified: 2010-04-18
We started with one server (SBS 2003) and just brought a new server online (W2k3 Standard - in the same domain) and would like to move some shared folders over to it - however the folders have tons of different permissions within its various subfolders...rather than recreate them, is there any way to copy over the permssions along with the data contained in the folder? Thanks!
0
Comment
Question by:smokysteve
  • 3
  • 2
5 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 17785965
SCOPY (NT 4 Resource Kit)
XCOPY (built in to all versions of Windows)
ROBOCOPY (Resource kit/extra on the CD)
XXCOPY (third party utility)
Backup programs (Including NT Backup)

All have the ability to copy permissions.  The first four are command line tools.
0
 

Author Comment

by:smokysteve
ID: 17785998
Thanks! I might as use what's included with Windows. (Xcopy) - would the /o switch do the trick?
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 17786017
That's the key one for security - don't forget the others, such as /e for sub directories.  I usually use /E /C /H /O /Y
0
 

Author Comment

by:smokysteve
ID: 17786043
Thanks! So far I've come up with: xcopy <source> <destination> /e /c /h /q /k /o
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 500 total points
ID: 17786066
Make sure you put the source and destination in quotes - this will help protect against the possible problems with file names that use spaces.

/Q is unimportant.  /K is ok if you want to preserve the attributes.  You need not use /Y, but if you don't you may regret it.

xcopy "<source>" "<destination>" /e /c /h /q /k /o
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question