Quantcast
Channel: Sysinternals Forums
Viewing all articles
Browse latest Browse all 10386

Miscellaneous Utilities : Robocopy is not mirroring correctly (copy problem)

$
0
0
Author: user147
Subject: Robocopy is not mirroring correctly (copy problem)
Posted: 17 June 2013 at 11:05pm

I have a comment about the Microsoft command-line tool robocopy which is unfortunately not part of Sysinternals.

I'm using the tool for many years but the latest versions that comes with the OS are rather buggy. Options like /FAT or copying NTFS security /COPY:DATS are unfortunately not working correctly anymore.
So far I'm getting over this by using the older XP026 version of robocopy but there is another problem with the tool for years.
When using the /MIR option it's actually not mirroring directories correctly.
This happens when files with a ~ (tilde) in the name are copied.
When using NTFS volumes, with 8.3 name creation enabled (the default), and the source directory contains e.g. a file named Filena~1.txt and also a file named Filename01.txt the files are not copied correctly.
robocopy does then sometimes copy Filename01.txt first and then wile copying Filena~1.txt
it's replacing Filename01.txt. So leaving Filename01.txt on the destination with the data of Filena~1.txt
So after the mirroring the destination contains one file less than the source and also a file with incorrect information.
(Note: when copying with "Windows Explorer 8" there is a similar problem when copying or moving)
Maybe the problem can be solved by scanning the source directory differently and copying the ~ files first so the destination filesystem will handle the 8.3 naming correctly when copying Filename01.txt (dir /x).
As I don't know a good entry point at Microsoft I hope that someone does know where to report this. It would be very much appreciated if someone can help.

Commands
mkdir C:\Temp\1
cd /d C:\Temp\1
echo File: Filena~1.txt > Filena~1.txt
echo File: Filename01.txt > Filename01.txt
robocopy "C:\Temp\1" "C:\Temp\2" /MIR


/Robert


Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>