RoboCopy problem - backup folder turning into a hidden system folder

Soldato
Joined
2 May 2004
Posts
19,950
I've got a RoboCopy backup script that mirrors my portable external hard drive excluding some folders that don't need to be backed up.

Here's the code:
Code:
robocopy /MIR G:\ D:\PortableExternalBackup\Files\ /R:50 /W:10 /XA:SH /XD "$RECYCLE.BIN" "RECYCLER" "System Volume Information" "Cisco Apps" "Software"

I know the exclusion of $RECYCLE.BIN, RECYCLER etc. is probably not necessary now that I have XA:SH in there, but I've left it for now just in case (could someone confirm that excluding them isn't necessary when I use XA:SH?).

Anyway, once the mirror backup has been complete the destination folder disappears, I have to show both hidden folders and system files to find it again.

Any ideas why?

Thanks,
Craig.
 
Soldato
OP
Joined
2 May 2004
Posts
19,950
Ah, OK, so do you just do the second level of directories rather than the top directory and leave it at that?

What's done with the files that are under the root directory, but not in a sub folder?

[Edit]
Just added the LEV:1 command to my first backup script to only backup the files in the root directory, however once the backup is complete the backup folder still becomes a hidden/system folder :(

I'm creating the directory manually before the RoboCopy runs (a lot of people on various websites have said that letting RoboCopy create the directory makes it a system/hidden folder).

[Edit]
Sorted with /A-:SH :)

Thanks,
Craig.
 
Last edited:
Back
Top Bottom