I am trying to rename files in a batch.
But I want to use special characters in the file name like these ==> ♥♦♣♠
(ascii code 3,4,5 and 6)
Is there a way to insert these into a file name using batch commands?
Perhaps using a function that translates ascii code to a character?
Using special characters when renaming file
Moderator: DosItHelp
Hello keneo,
you can use chr.bat to build a file with ascii-characters (in hexformat)
call chr.bat 41
creates a chr.tmp file with one "B"
hope it is useful
Jan Erik
you can use chr.bat to build a file with ascii-characters (in hexformat)
call chr.bat 41
creates a chr.tmp file with one "B"
Code: Select all
@ECHO off
setlocal
(
echo a100
echo db %~1
echo.
echo rcx
echo 1
echo w
echo q
) | debug chr.tmp > NUL
for /f "tokens=*" %%l in (chr.tmp) do set chr=%%l
echo %chr%
hope it is useful
Jan Erik