Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Fixed Output leading blanks in a string that is "SafeEcho"'s...

May
855
0
First an apology if one is needed. In the back of my mind I have a dim memory that this "problem" has already been discussed and fixed and/or worked around, but if that is the case I haven't been able to "dig it up" as of this moment. And the problem is really quite simple: %@SafeEcho is "eating" leading whitespace (at least blanks) on the string that it is echoing. Specifically to demonstrate, a batch file containing just this:
Code:
@SafeEcho         This is a test
@SafeEcho #       This is a test
produces:
Code:
This is a test
#       This is a test
all of the leading blanks being "eaten" by the SafeEcho command.

Well, I really do want those leading blanks, and I'd rather not have the leading pound sign in the output, but, frankly, that's a better option in terms of my goals in writing this batch file than is the leading blanks just "disappearing" altogether. So is there some already-known way to do what I am trying to do?
 
Dadgummit, I did fix that once. But it seems that fix got lost somewhere along the way....

I've uploaded a new build, which restores the lost bit.
 
Thank you, Charles, you've made me very happy!!!:) And since I was relatively sure that this "issue" had been "handled" in the past, I was beginning to think that I was starting to remember things that had not happened (really scary) as well as forgetting things that had!!! Thank you yet again!!!!

- Dan
 
In this case, it's my memory at fault, not yours. I think what happened is that I was reviewing the code at some point, forgot why I had made that change, asked myself "What if the user types two spaces before a /? instead of just one?" and put it back the way it was originally.
 
Back
Top