Try:
echo.           >junk.txt
dir junk.txt
06/29/2010  05:35 PM                13 junk.txt

Typing junk.text shows no period.


-----Original Message-----
From: Carl Houseman [mailto:[email protected]] 
Sent: Thursday, June 10, 2010 10:26 AM
To: NT System Admin Issues
Subject: RE: Scripting -- How to Echo Spaces???

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/>  ~
--------------------------------------------------------------------------------
We value your opinion!  How may we serve you better? 
Please click the survey link to tell us how we are doing:
http://www.craneae.com/ContactUs/VoiceofCustomer.aspx
Your feedback is of the utmost importance to us. Thank you for your time.
--------------------------------------------------------------------------------
Crane Aerospace & Electronics Confidentiality Statement:
The information contained in this email message may be privileged and is 
confidential information intended only for the use of the recipient, or any 
employee or agent responsible to deliver it to the intended recipient. Any 
unauthorized use, distribution or copying of this information is strictly 
prohibited 
and may be unlawful. If you have received this communication in error, please 
notify 
the sender immediately and destroy the original message and all attachments 
from 
your electronic files.
--------------------------------------------------------------------------------

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

Reply via email to