Robocopy - adding attributes to specific folders

duckson

New member
Local time
4:49 AM
Messages
6
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 Computer

Computer Manufacturer/Model Number
HP HDX9430 laptop
OS
Windows 7 Pro x64
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

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 Computer

Computer Manufacturer/Model Number
Custom made
OS
Windows 7 Professional x64 PL
CPU
AMD Athlon 4450e
Motherboard
Giga-Byte GA-MA69G-S3H
Memory
GoodRam DDR2 2x2048MB (FSB 800MHz)
Graphics Card(s)
nVidia GeForce 9600GT (G94-300) 1024 MB
Monitor(s) Displays
SAMSUNG SyncMaster HS2P301688
Hard Drives
Seagate ST3750330AS 750GB
PSU
Corsair 550W
Cooling
AeroCool ExtremeEngine 3T
Back
Top