-----Original Message----- From: Derrenbacker, L. Jonathan Sent: Thursday, June 10, 2010 1:17 PM To: '[email protected]' Subject: re: Scripting -- How to Echo Spaces???
Thanks for everyones responses! I gave a bad example of what I'm trying to do. I'm trying to echo spaces on a line by itself, not after text. Sorry about that. Echoing spaces after text does work. Echoing spaces, by themselves, doesn't see to. Better example: ----------------------------------- Echo line1 bla bla bla >> test.txt Echo >> text.txt Echo line3 bla bla bla >> test.txt ------------------------------------ It needs to actually be spaces, not a line break. I'm feeding the created .txt file into another program that needs spaces sent to it. Thanks again, Jon On Thu, Jun 10, 2010 at 11:18 AM, Andrew S. Baker <[email protected]> wrote: > 2.Set a variable that is longer, and only output a specific number of Smart idea. I tried it, example below, but it outputs "ECHO is on. " If I let it include the end "1's" it echos out the spaces and 1's. Weird.... ------------------------------------------------------------- SET spaces=zz 11 SET spaces=%spaces:~2,10% echo %spaces% >> test.txt ------------------------------------------------------------- On Thu, Jun 10, 2010 at 11:18 AM, Andrew S. Baker <[email protected]> wrote: > Here are some options: > 1. Make the last space character ALT-255 > 2. Set a variable that is longer, and only output a specific number of > characters > The way you have written it should output the space to the file. > -ASB: http://XeeSM.com/AndrewBaker > > > On Thu, Jun 10, 2010 at 10:05 AM, Derrenbacker, L. Jonathan > <[email protected]> wrote: >> >> This seems so simple, but I'm stuck. >> >> I'm writing a new bat file in windows and I need to echo spaces to a file. >> >> For example: >> >> echo bla bla bla <space><space><space><space> >> results.txt >> >> Anyone know how to echo a space? >> >> I've tried $S, I've tried putting " " around spaces, I've tried echo >>   >> >> Any ideas? >> >> Thanks in advance, >> >> Jon >> >> >> >> > > > > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
