Solved

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

Posted on 2006-10-22
5
310 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now