Windows PowerShell Home
robocopy.exe fails when using chcp 65001
11/7/2012 12:45:45 AM
User(s) can reproduce this bug
I use "C:\Windows\system32\robocopy.exe" in a batch file to copy a file including Unicode characters in the file name.
Before calling robocopy.exe I set the code page to UTF8 (chcp 65001). -> The call of the robocopy.exe will not do the expected operation
Note: When I copy the robocopy.exe from its original destination ("C:\Windows\system32") to e.g. "C:\Temp" and use the copied robocopy.exe in my batch file all works fine!
Operating system is Windows 7 Ultimate 64bit (German)
Version of Robocopy.exe is 22.214.171.1247
How often does this happen?
Have you seen this problem before in this product?
I don't know if this issue existed previously
1. Paste the following code to a text editor (e.g. notepad++) and save it as "test.bat" using encoding "UTF8 without BOM":
"C:\Windows\System32\ROBOCOPY.exe" "C:\Test1" "C:\Test2" "中文.txt"
2. Create a file with full path "C:\Test1\中文.txt".
3. Create a new empty directory "C:\Test2".
2. Run the file "test.bat"
Result: No file is copied, but robocopy.exe returns "The operation completed successfully."
File "中文.txt" should be copied from directory "C:\Test1" to "C:\Test2".
to post a comment.
Please enter a comment.
on 11/15/2012 at 5:30 AM
I wonder if there is any news on this issue?
to post a workaround.
Please enter a workaround.
© 2014 Microsoft