I find it hard to believe that I have lived with this for four years. I recently was persuaded to look closer at this problem of the attribute bits.
This page says “ … I found out that Robocopy has a bug where it alters the attributes of the directory to a system and hidden file. It's been known for quite some time …”
This page says “ … RoboCopy may set the new directory to hidden, as it copies the system attribute of the root folder of the drive over to the new folder. …”.
Two types of solution are offered:-
(1) Use the “/A-:SH” parameter on the command line
(2) Do an ATTRIBute pass after the backup is made “start /B /WAIT attrib -s -h -r /s /d”
That I did not report back after March 2020 might suggests that the first suggestion worked.
Since then I have moved through Win10, Win11, and back to Win7, and the problem persists.
Two days ago I reasoned that:-
(a) the batch file I use for making nightly backups had not changed
(b) the problem persisted through three different versions of Windows and
(c) I had made no changes to dear old ReboCopy.EXE
Perhaps I had multiple copies of RoboCopy and one of them had the bug, and that was the version I had switched to.
1.png
Well, I have three versions of RoboCopy on my data drive; I may have even more on my weekly accumulative backup drive.
Two nights ago I inserted code to use a specific version of Robocopy in the batch file:-
Code: Select all
set ROBOCOPY="T:\Appl\UTIL\RoboCopy.exe"
set ROBOCOPY="C:\Windows\SysWOW64\RoboCopy.exe"
set ROBOCOPY="C:\Windows\System32\RoboCopy.exe"
and:-
Code: Select all
%robocopy% t:\ y:\%computername% /s /r:0 /w:0 /A-:SH /log:%LoggingFile%
2.png
I have run the modified backup file for two nights now, and the folders on the backup drive appear before and after the backup.
I am feeling quite happy with my sleuthing.
If the bug is in RoboCopy then maybe an earlier version of RoboCopy does NOT have the bug.
I use Robocopy quite simply – indeed, only for backups and restoring a data drive from a backup, so the 125KB version is fine for me.
Perhaps I was initially using the 78K version, then switched to the 97KB version (with the bug), and am now up to date with the 125KB in which the bug is fixed.
Moral: Hang on to old versions of software and fall back (or in my case forwards) to avoid the bug.
Cheers, Chris
You do not have the required permissions to view the files attached to this post.