Robocopy error code 0x00000040 when copying files and folders with umlauts

Robocopy error code 0x00000040

We have already reported on Robocopy , the ingenious Windows copy program , in the past. At the end of this article you will find numerous links that show you more information about the Robocopy program.

But today we want to talk about the fairly common one

Robocopy error code 0x00000040

report that also took our nerves a little while ago. We back up a lot of servers at night with Robocopy and the jobs usually run smoothly. However, an error occurred more and more in the Robocopy logs during a job

2018/09/05 23:57:07 ERROR 64 (0x00000040) source directory is being checked P: data sheets drivers examples
The specified network name is no longer available.

This error was repeated several times in the Robocopy log file and the cause was initially unclear until we found that all error lines with the error code 0x00000040 contained a ” umlaut ” in the file name or in the folder name. Also in our example above, where an “” “for an” ä “is shown in the log file . However, the folder name was really displayed in Windows Explorer with the word “data sheets”.

Apparently Robocopy has a problem with the umlauts and as a result incorrectly assign the paths and copy the files. The Internet forums are full on the subject, but we have been looking for a solution for a long time.

Change CodePage

By default, the batch files run under CodePage 850 . You can test this very easily by using

CHCP

entered in a command prompt window. This then looks like this.

CHCP

This code page 850 is called “DOS-Latin-1” . If you now switch to CodePage 1252 (Western European or ANSI) at the beginning of your batch file , error code 0x00000040 no longer occurs and the folders and file names with umlauts are copied correctly.

Here, as previously announced, further information about the “Robocopy” command .

– Robocopy Task run slower than normal via Task Scheduler (Task Scheduler)
– Robocopy error 1392 (0x00000570) – The file or directory is damaged and unreadable.
– Accelerate Robocopy with parameter / MT
– Robocopy – Prevent existing files from being copied again – Parameter / FFT
– Copy directories without authorization with Robocopy
– Robocopy error while copying 0x80070021

administrator