echo. >abc.txt

abc.txt now contains a line with one space and a newline.
Tested on Windows 7 only so YMMV.

Carl

-----Original Message-----
From: Derrenbacker, L. Jonathan [mailto:[email protected]] 
Sent: Thursday, June 10, 2010 1:17 PM
To: NT System Admin Issues
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:
> 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
>> &#032;
>>
>> Any ideas?
>>
>> Thanks in advance,
>>
>> Jon
>>
>>  
>>
>>  
>
>  
>
>  

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~



~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to