Page 1 of 1

Using special characters when renaming file

Posted: 02 Dec 2009 16:39
by keneo
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?

Posted: 02 Dec 2009 21:07
by BILL Dos
special characters and symbols would need the help of a 3rd party app just google around and should be something out there to help u ..

Posted: 04 Dec 2009 05:35
by jeb
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"

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