Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I'm using a for loop in a command script to read lines from a file. I am then echoing each line as part of a sentence, to the screen.
But some of the lines in the file contain special characters, so when I try to echo them to the screen, I get an error.
For example, when I try to echo the string:
J |\\| O N N |_ /\\ Y" <
I get the error:
'\\' is not recognized as an internal or external command,
operable program or batch file.But this is just a specific example; I don't always know which special
characters there will be.Is there a way of echoing a special-character string read from a file, to the screen, without getting an error?
Many Thanks,
Jonny

Hi Jonny,
No way I know of to echo special chars.
I troed to set a var and echo the var.
It didn't help.
You can copy filename con > nul
This is not "echoing" but depending on what you're trying to do may be an acceptable work-around.
HTH
M2
If at first you don't succeed, you're about average.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |