I am debugging a windows batch command file. It is failing when extended (> 0x7f) characters are used in the paths or file names. The problem seems to be related to passing parameters to a command file that is CALLed from another.
For an example, this command works as expected:
xcopy "Pezuñero\1 - 001.wav" \temp
This does not:
call another.cmd "Pezuñero"
Contents of "another.cmd":
xcopy "%~1\1 - 001.wav" \temp
The %~1 syntax expands a parameter and removes quotes. This is necessary because in the real command file, the paths in either the calling or called command file may have spaces.
The result of the second example (copied from the CMD window) is this:
C:\>call another.cmd "Pezu±ero"
C:\>xcopy "Pezu±ero\1 - 001.wav" \temp
File not found - 1 - 001.wav
0 File(s) copied
Note that the "ñ" (0xF1) character has been changed to a "±" (0xB1).
Can anyone explain what is going on, and how to work around this?