Today I ran into a limitation of robocopy that just might have bitten me in the past and I never knew it.
I got pulled aside to ask my opinion of how a robocopy of a large filesystem yielded no errors in the robocopy log, but differed in file-count by 6 files. The user was able to identify a directory with a file that got missed, which helped. The files in the directory were named similar to this:
Looking at the short-names of the two directories I noticed something else. In the source directory...
ITWA-National Introduction.doc = ITWANA~1.DOC
ITWA-National Overview.doc = ITWANA~3.DOC
ITWANA~2.DOC
And on the destination directory...
ITWA-National Introduction.doc = ITWANA~1.DOC
ITWA-National Overview.doc = ITWANA~2.DOC
AHA! Robocopy isn't preserving the short-names! When it copied the second document to the destination it allowed the system to auto-generate the short-name, and as that was the second ITWANA document, it got ~2. So when it copied ITWANA~2.DOC in, it overwrote the already existing ITWANA~2.DOC file.
We're now looking for a tool, preferably scriptable, that'll preserve short-names. I found a couple of 'em, but they're !free. Currently we're laundering things through the Windows backup facility since that preserves ALL attributes. If you know of such a tool, drop a comment.
I got pulled aside to ask my opinion of how a robocopy of a large filesystem yielded no errors in the robocopy log, but differed in file-count by 6 files. The user was able to identify a directory with a file that got missed, which helped. The files in the directory were named similar to this:
- ITWA-National Introduction.doc
- ITWA-National Overview.doc
- ITWANA~2.DOC
Looking at the short-names of the two directories I noticed something else. In the source directory...
ITWA-National Introduction.doc = ITWANA~1.DOC
ITWA-National Overview.doc = ITWANA~3.DOC
ITWANA~2.DOC
And on the destination directory...
ITWA-National Introduction.doc = ITWANA~1.DOC
ITWA-National Overview.doc = ITWANA~2.DOC
AHA! Robocopy isn't preserving the short-names! When it copied the second document to the destination it allowed the system to auto-generate the short-name, and as that was the second ITWANA document, it got ~2. So when it copied ITWANA~2.DOC in, it overwrote the already existing ITWANA~2.DOC file.
We're now looking for a tool, preferably scriptable, that'll preserve short-names. I found a couple of 'em, but they're !free. Currently we're laundering things through the Windows backup facility since that preserves ALL attributes. If you know of such a tool, drop a comment.
Haven't run into the issue you're having (that I know of), but just want to throw a couple program names your way if you haven't thought of them already, those being DeltaCopy and RichCopy. Don't know if they would fix your issue, but...
RichCopy is on my list, but I can't dredge up whether or not it does short-name sync. Haven't had time to test. DeltaCopy, IIRC, is pay-for when used commercially. XXCopy does exactly what we need, but it's pricing model is such that it'll take a few days to convince TPTB that it needs purchasing.
try syncback pro... its not expensive for the full edition but freewill probably cut it.
why not just disable short name generation? i've not run into anything in a long time that actually needs them.
@Tommy
I tried syncback-free, but it suffers the same problem. Ran a test and everything.
@Jhordindy
These files are coming from media we don't own, so can't set the short-name generation disable option on the source. Setting it on the target is somewhat iffy, since we'd really like the metadata to be preserved if at all possible.