0

I came here looking for going the other way (opposite to the way posted in echo -e equivalent in Windows?):

I have a text file with ASCII chars, to be converted to a text file with ASCII equivalent of the characters in the text file.

eg. a text file containing "--" to be changed to a text file containing "4545".

Anyone got dos code for this? Thanks,

Community
  • 1
  • 1
Zimba
  • 2,854
  • 18
  • 26

1 Answers1

0

For Microsoft QBasic

dim character$(1):dim number%
open "inputfile" for Binary as 1
open "outputfile" for Binary as 2
while not eof(1)
get #1,,character$:put #2,,asc(character$)
'here one byte string is converted into character number
wend
close