hansbos
asked on
Problem with echo of escape codes in batch file
The following line in a batch file works in Win98 but not in WinNT.
echo &l0O&l8D(s12H >> TEST.UTV
The first character after the echo is the Escape character (ascii 27).
The purpose is to add some printer-format codes to a file to switch from portrait to landscape, but on WinNT I get the response:
The name specified is not recognized as an internal or external command.
echo &l0O&l8D(s12H >> TEST.UTV
The first character after the echo is the Escape character (ascii 27).
The purpose is to add some printer-format codes to a file to switch from portrait to landscape, but on WinNT I get the response:
The name specified is not recognized as an internal or external command.
ASKER
Percy,
Thanks for your comment. I tried your command but I didn't get the escape codes in the file.
I already made a bypass by using the type command in combination with a file with the printer codes, but I was just curious if there was a way to echo the escape codes.
Hans
Thanks for your comment. I tried your command but I didn't get the escape codes in the file.
I already made a bypass by using the type command in combination with a file with the printer codes, but I was just curious if there was a way to echo the escape codes.
Hans
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
NT doesn't provide ANSI support (flashy escape codes) in its command line.
However, you could configure autoexec.nt / config.nt to include the ANSI driver, open a DOS session, and then use escape codes to send to your printer.
However, you could configure autoexec.nt / config.nt to include the ANSI driver, open a DOS session, and then use escape codes to send to your printer.
ASKER
Percy,
Thanks. The "^"-character worked.
Hans
Thanks. The "^"-character worked.
Hans
echo ^[^&l0O^[^&l8D^[(s12H >> TEST.UTV
Percy