How do you do....it? Thread, Robocopy Permission only in Technical; I have previously Archived some group files, but for some reason not all the permissions copied across properly. Now all ...
3rd June 2014, 03:22 PM #1
Robocopy Permission only
I have previously Archived some group files, but for some reason not all the permissions copied across properly. Now all I want to run is Robocopy to copy the permissions of the folders but not copy the contents. The switch I have used is /mir /sec /secfix /xo /xn /xc but if I use that it copies the contents also. If I drop the /mir /sec it doesn't copy anything.
I'm not sure if I have got it configured incorrectly but I thought I could just copy the folder permissions by using /xo -exclude older, /xn - exclude newer, /xc -exclude changed and to be doubly sure I also tried /xx exclude extra files directories but still with the same result.
Can anyone provide me with the correct switches?
3rd June 2014, 07:49 PM #2
I don't think you need the /mir according to this KB? How to Use Robocopy to copy security information without copying any file data
Not tried it though so probably try with a small test folder first.
It is a little old though so may have changed...
Edit: I should read properly before replying as you already tried what the KB says, so you should be right with what you're doing according to it.
Last edited by Cache; 4th June 2014 at 12:22 AM.
4th June 2014, 08:31 AM #3
That's what I thought, but testing it on some smaller folders results in copying the contents too OR not copying permissions.
4th June 2014, 10:28 AM #4
OK, I've just modified the switches to the following - /mir /sec /secfix /xf "*.*" with the idea being that I don't want to move any files so I have excluded ALL files with *.* which should then just copy the permissions of the folders over. All files should have inheritance on so they should inherit the correct settings. I've tested this on a test folder and it seems to work.
This has only become about because someone was looker for some files which have been moved to the archive area where the permissions weren't copied correctly and they couldn't find their files. Can someone just cast their eye over it before I run it on our group drive as I don't want to make things worse!!
4th June 2014, 04:23 PM #5
Just thought I'd bring some update on this as I think one of the reasons I was having an issue is that I was testing the switches on my Windows 8 machine and it needs to be running on a Server 2003 box. As such I think the switches are slightly different due to the versions of Robocopy being used. I thought I'd done the same in the past but obviously not. Best make sure I test thing properly next time
4th June 2014, 09:34 PM #6
Pleased you got it sorted anyway.
By PrimaryTech in forum Windows 7
Last Post: 14th October 2013, 09:53 AM
By glennda in forum Scripts
Last Post: 10th January 2013, 11:56 AM
By OutToLunch in forum Windows Server 2000/2003
Last Post: 26th May 2010, 03:38 PM
By beeswax in forum Windows
Last Post: 25th April 2006, 01:12 PM
By woody in forum Windows
Last Post: 2nd August 2005, 11:15 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)