this would be quite hard,
you can try to use this command to convert dec string into hex or ASCII symbol
call cdm /b exit /b %dec%
and this line to catch hex value or ASCII symbol
set hex=%=exitcode% & set ascii=%=exitcodeascii%
in this case your !ascii! would be a binary byte which you can output to file, and %dec% vould be index number of that symbol in table, and you would need to map a whole table of symbols
http://www.utf8-chartable.de/unicode-ut ... &htmlent=1and compose unicode characters by ascii symbols.
This would be quite hard and slow.
I suggest you to use combo of to lines above to get hex valuer, and XVI32 hex editor script, which would allow to write binary data from set of hex values, this will help to avoid mapping.
some explanation of how scripts works
http://www.chmaas.handshake.de/delphi/f ... xviscr.htmyou can combine them with your bat file just by single command line with several arguments which would be passed to script.
Keep in mind that batch files alone not very friendly with binary data, in most cases best option is to search command line took that could write binary files