I have a TFS project with type 0x96 in its name, for example. "Project - X", which I need to specify in the batch file. The problem is that this particular dash is represented by 0x96 (rather than 0x20), which is the control character in Unicode (û in ASCII?), So the following (in the ANSI-encoded .cmd file) fails as "Project û X" .
echo "Project – X"
But when you inserted directly into the command line (I think), it cheats and translates 0x96 to 0x20 (which is not good, since my file names do not match). I tried this with a hex editor, and it looks like cheating is happening there.
A .cmd file will not work if it is encoded as nothing but ANSI.
source
share