Robocopy wont copy folders with a dot at the start

5

I'm trying to use robocopy to copy some files to a network drive. Here's the command I am using:

robocopy /Z /E /R:10 /W:30 /tee /ETA H:\ "\cloud\backup-leon\The Flash\Data" /XD "Temp" "Temporary Internet Files" /XF pagefile.sys hiberfil.sys /log:"\cloud\backup-leon\The Flash\log.txt"

The problem is that it skips all files beginning with a ., e.g. .bin. Is there any way to allow robocopy to copy these types of files?

Leon W

Posted 2017-03-30T21:05:16.267

Reputation: 305

What is your exact command? – Steven – 2017-03-30T21:15:52.890

Install bash for Windows 10 and use Linux :p – FreeSoftwareServers – 2017-04-01T02:19:55.900

1Is it reporting errors for these dot files during the copy? Tested filenames beginning with . and they copy fine for me. – Clayton – 2017-07-05T14:30:19.720

Have you found a solution to this problem? I have been able to use the same command that you posted in your question and it works for me. Manually created files using PowerShell (New-Item ...bin) and it still copies successfully. If there are error messages saved in the logs, please post them. – Ashton – 2017-08-10T05:09:03.023

I intermittently hit something like this copying from my local machine to a freenas machine with a CIFS share when there is already a file of the same name (starting with a dot) at the destination. I'm the only one copying to the share, via the same script every time. I'll get access denied errors when robocopy tries to copy the file starting with a dot. I've yet to reliably reproduce it, but when it happens, deleting the file fixes it. I realize that's not terribly helpful, but you're not the only one seeing wonkiness with robocopy/network shares and dotted file names... – aggieNick02 – 2017-09-26T22:10:52.737

Answers

0

As other mentioned in the comments robocopy doesn't have any problems with that files that start with a dot, I made a test with several files and directories that start with a dot using the same parameters that you and it copied them without any problem.

Since that files are mean to be hidden in Linux some multi-platform programs mark that files as hidden to achieve the same behavior in Linux and Windows, so I tried marking that files as hidden and robocopy also copied them.

So I have two theories:

  • The problem is related with file permissions, you should check the log to see if there are any problems when accessing that files.

  • The files are indeed marked and hidden and since robocopy maintain that attribute you don't see the hidden files in the destination for some reason (the \cloud\ in the destination folder makes me thing that it's not a regular folder).

Alberto Martinez

Posted 2017-03-30T21:05:16.267

Reputation: 1 235