Return character from ASCII code in Windows Batch
<p>I made a program for coding text strings in Batch. Now, I have to convert the ASCII code to a character. In reality, I have to do the opposite.
I divided the chars of the strings and I want to translate it to ASCII.
I found a good command to convert ASCII to char:</p>

<pre><code>cmd /c exit 65
echo %=exitcodeAscii%
</code></pre>

<p>But, when I run it in a for cycle it stops working. With the for iteration I verify if the ASCII code (the for index) is the same of the character.</p>

<pre><code>@echo off
setlocal enableDelayedExpansion
set char=A
for /L %%a in (32,1,126) do (
cmd /c exit %%a
echo %=exitcodeAscii%
if %=exitcodeAscii% EQU %char% echo %%a
)
</code></pre>

<p>It seems that the cmd doesn't work. How can I resolve this?</p>