Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Robocopy - adding attributes to specific folders

17 Nov 2009   #1
duckson

Windows 7 Pro x64
 
 
Robocopy - adding attributes to specific folders

I've had some issues with mirroring my root directory to a backup folder on my netbook in that the backup folder becomes hidden and a system file after Robocopy has run (note the backup folder existed beforehand).
To stop this happening i believe i can include the switch /A-:SH which would remove the system and hidden attributes to the entire backup folder and all folders under it?

However if i wanted to maintain the hidden attribute on a particular folder could i add /A+:H "//netbook/C Drive/Backup/hidden_folder" to the command line as well?
I'm assuming this would have the same affect as attrib +h "//netbook/C Drive/Backup/hidden_folder" ?

I currrently have:-
robocopy /MIR d:\ "//netbook\C Drive\Backup" /XA:S /XD d:\windowsimage d:\downloads d:\bittorrents "d:\bittorrents completed"

I'm intending to change it to:-
robocopy /MIR d:\ "//netbook\C Drive\Backup" /XA:S /A-:SH /A+:H "//netbook/C Drive/Backup/hidden_folder" /XD d:\windowsimage d:\downloads d:\bittorrents "d:\bittorrents completed"

(making all folders unhidden and non-system but add the hidden attribute only to the hidden_folder folder).


Would you say this is correct and will produce my required results?


My System SpecsSystem Spec
.

17 Nov 2009   #2
Flavius

Windows 7 Professional x64 PL
 
 

Quote   Quote: Originally Posted by duckson View Post
[FONT=Arial][SIZE=2]I've had some issues with mirroring my root directory to a backup folder on my netbook in that the backup folder becomes hidden
in my opinion it is strange because you don't use /COPY: or /COPYALL switchers

Quote:
robocopy /MIR d:\ "//netbook\C Drive\Backup" /XA:S /A-:SH /A+:H "//netbook/C Drive/Backup/hidden_folder" /XD d:\windowsimage d:\downloads d:\bittorrents "d:\bittorrents completed"
In my opinion it won't work.You can't use /A+:,/A-: switchers for only particular objects.You can use it only for all copied objects.
In my opinion it will be appriopriate -unfortunatelly it require two commands:

robocopy /MIR d:\ "//netbook\C Drive\Backup" /XA:S /A-:SH /XD d:\windowsimage d:\downloads d:\bittorrents "d:\bittorrents completed"
attrib +h "//netbook/C Drive/Backup/hidden_folder"


MS Technet about robocopy Robocopy

other Robocopy
Robocopy - Wikipedia, the free encyclopedia
My System SpecsSystem Spec
Reply

 Robocopy - adding attributes to specific folders




Thread Tools





Similar help and support threads
Thread Forum
ROBOCOPY - /MOV to two destination folders
Hi there, New to the forum, please go easy :) I've got a robocopy moving a file using /MOV from one folder to another. Is it possible to add a second destination so that the contents of the original folder will be moved to both destination folders? How would the syntax look? (below is...
General Discussion
How do I restore default attributes to files and folders in Windows 7
Something in my computer changed the way that certain files are hidden. I do not have a recent restore point that allow me to reverse the changes; does anyone know of a way to reset the attributes of files and folders to their default settings in Windows 7?
Backup and Restore
Robocopy copying folders from the wrong place
I've set up a back up batch file to copy my Documents, Pictures, Music, and Videos folders from my computer to an external hard drive. However, while running the Documents backup, it seems to find, the pictures, music, and videos folders all inside the documents folders labelled "My Music", etc. ...
General Discussion
robocopy skipping folders (moving c:\users)
Hey there, I'm attempting to use the guide posted on lifehacker to move the users folder to a different drive as W7 is installed on a rather small SSD. The guide is here: Move the Users Directory in Windows 7 I followed the directions to the letter, except of course, when it came to...
General Discussion
Robocopy backup for personal folders
I have created a batch file for copying my Documents folder to an external hard drive: The log file shows that it is backing up C:\users\USERNAME\documents\My Music and C:\users\USERNAME\documents\My Pictures. That's fine, because I want those backed up anyway, but when I go to...
Backup and Restore
How I change attributes of my folders to read only ?
Hello > my system is hidden my folders and i can't show it now because it hidden by operating system. how do i show it ?? help me please
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:15.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App