robocopy.exe fails when using chcp 65001
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 64bit
Version of Robocopy.exe is 5.1.10.1027
Steps to reproduce:
1. Paste the following code to a text editor (e.g. notepad++) and save it as "test.bat" using encoding "UTF8 without BOM":
@echo off
chcp 65001
"C:\Windows\System32\ROBOCOPY.exe" "C:\Test" "D:\Test" ".txt"
pause
2. Run the file "test.bat"
-> The call of the robocopy.exe will not work as expected, but returns "The operation completed successfully."
October 29th, 2012 6:59am