I have a Windows batch file which has an instruction to execute an EXE file in a location whose path contains accented characters. Following are the contents of the batch file.<
Since you have @echo off
you can't see what your batch is sending to the command prompt. Reproducing your problem with that off it seems like the ñ
character gets misinterpreted since the output I see is:
C:\espa±ol\jre\bin\java -version
The system cannot find the path specified.
I was able to get it to work by echoing the command into the batch file from the command prompt, i.e.
echo C:\español\jre\bin\java.exe -version>>test.bat
This seems to translate the character into whatever the command prompt is looking for, though I've only tested it with English locale set so I don't know if it'll work in all situations for you. Also, if you open the batch in a text editor like notepad it looks wrong (C:\espa¤ol\jre\bin\java.exe
)