Special Characters in a .Bat

March 2017

Special Characters in a .Bat


So here, I would like to rename mp3 files with the command "rename" from the back. As I ought to rename about 150, I told myself that I can make me one. "Bat" with lines like:

[Contents. Bat]

rename "a.mp3" was No. 86.mp3 "

[End. Bat]

But then, this idiot cannot take proper care of the character "No" (which corresponds to ALT + 167 for the ASCII table 2). Instead, I get a horrible character and white square.

The curious thing is that when I type the same thing in the command prompt, it works great! The character normally appears in the name of the renamed file.


Did you try to edit then (it is the publisher basic MS DOS)?
One of the best editor, from what I heard is notepad + +, with test.
Otherwise, an idea came to me, you can try to find the character of the editor that corresponds to a '°' in the shell.
echo "°"> carac_deg.txt

if not, write all the character of 127 to 255 in your editor is watching what happens in your console.
In my opinion, the character code '°' is 248 in the console. Use this little program if you want to know:
Stdio.h int main () {for (int i = 0; i <256; i + +) {printf ("% d \ t% c \ n", i, (unsigned char) i);} scanf ("") return 0;}


Solved by Char Snipeur


Published by aakai1056.
This document, titled "Special Characters in a .Bat," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).