motivation
I have a 3rd party, somehow long .bat file written for some specific function and would take considerable effort to re-write (which effort is also hindered by my problem). In for loops the most basic way to debug it would seem echoing some information to the screen. I used to do this with \r
(0x0D) character in other languages that on some terminals/console re-writes the same line (to avoid overflooding, since in my case the last line would contain the error). I already save the value to a variable. However, since iteration might take quite long, I'd still be happy to write some output to the screen that won't overflood.
what I've tried
- I know I can echo a single newline in
cmd
withecho.
- however I need only the carriage return - I've tried these but they did't work:
echo \r
,echo ^r
,echo \x0d
,echo ^x0d
,echo #0d
,echo ^#0d
,echo #x0d
,echo ^x0d
- I've tried to duck the net for similar stuff without much help
question
Is it possible to somehow echo a carriage-return (or other non-printable) character in a windows/dos/nt/cmd batch file?
ps. I use the XP or the 7 cmd processor