Computing.Net > Forums > Disk Operating System > urge echo-command to display the

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

urge echo-command to display the

Reply to Message Icon

Name: bob dusemund
Date: February 23, 2001 at 09:16:38 Pacific
Comment:

I want to generate dynamically html and for some other reason I have to use the echo-command. My question: is it possible to give the echo-command something like "chr(32)" in order to display (redirect) the needed character without an errror-message?



Sponsored Link
Ads by Google

Response Number 1
Name: Ayexby
Date: February 23, 2001 at 14:18:49 Pacific
Reply:


Maybe it depends on your version of dos, but the one I'm using right now allows me to echo spaces and html tags as long as they're enclosed in quotes. (Unfortunately the quotes get echoed too, but the html tags still work)


0

Response Number 2
Name: World Library
Date: February 24, 2001 at 11:37:05 Pacific
Reply:

Hi,
Have sent you an email with the code to create a html file with all the esc. chars.

It will not post here correctaly.

I am using LA for left arrow RA for right arrow.
The below is still in the development stages.
Feel free to develope.......lol

Copy and paste. name it hmmm.bat
It will create a html file called test.htm
and insert the code below into it.

@echo off
@goto batch
LA HTML RA
LA HEAD RA LA TITLE RA Test LA /TITLE RA LA /HEAD RA
Whatever!!!?+&* this is just a test LA P RA LA HR RA
LA/BODY RA
LA/HTML RA
:batch @
find /v "@" LA %0 RA test.htm
@dir test.htm

Hope this helps. Oh! Code is not mine.
Don't want any one thinking I have a clue.

World Library


0

Response Number 3
Name: Ayexby
Date: February 24, 2001 at 20:22:15 Pacific
Reply:


Okay, so you said you don't want anyone thinking you have a clue, but my (I'm just thinking out loud here--in writing) question is, how is that going to be dynamically generated? I mean, could you alter the file to accept command-line parameters?
What I mean to ask is, is that going to yield anything that is more useful than just writing the html directly?ò


0

Response Number 4
Name: Laurence
Date: February 24, 2001 at 23:09:39 Pacific
Reply:

Here are some examples:
@echo off
@goto batch
Echo HTML to Batch...


An online version of HELP
from version 6.22 , among
other goodies

:batch @
find /v "@" %temp%\test.htm
@edit %temp%\test.htm
@ :: needs work, but doable
@ :: must be made to work without extension used at prompt
@ :: and when batch is not in current directory

@echo off
@goto batch
Useless test
(*) Whatever (
)An online version of HELP from version 6.22, among
other goodies @~~~~~~~

A new line in HTML isn't a problem:

~~~~@ ~~~~@ ~~~~@ ~~~~@
~~~~@ Hi TED @~~~~ ~~~~@ ~~~~@

:batch @
:: @if exist useless.htm exit
find /v "@" useless.htm
@ dir useless.htm
@start useless.htm

@echo off

echo @prompt $lHTML$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat > test.htm

echo @prompt $lHEAD$g$lTITLE$gTest$l/TITLE$g$l/HEAD$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htm

echo @prompt Whatever$lP$g$lHR$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htm

echo This is the body text.>> test.htm
echo This is fun.>> test.htm
echo @prompt $l/BODY$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htm

echo @prompt $l/HTML$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htm

Batfiles: The DOS batch file programming handbook



0

Response Number 5
Name: World Library
Date: February 25, 2001 at 14:34:03 Pacific
Reply:

Well said Laurence!
I made a reguest on Usenet for the code I posted. Wish I had not purged the group as the Author does deserve credit.

Glad to see it is an ongoing project as it can make html (Oh I hate coding it) template making much easier.

Just a matter of inserting desired information in between html fragments.

My problem (I have lots of them LOL) is my
page has rows and columns.

Any thoughts on where I can find the code for a bat to loop 6 times and then jump to a new
label?

W.L.


0

Related Posts

See More



Response Number 6
Name: Laurence
Date: February 27, 2001 at 12:26:13 Pacific
Reply:

Sure! Read my FAQ ;-).


http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#33

http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#36


Batfiles: The DOS batch file programming handbook



0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: urge echo-command to display the

set var command in batch file www.computing.net/answers/dos/set-var-command-in-batch-file/11416.html

Echo command www.computing.net/answers/dos/echo-command/8895.html

ANSI control codes via Echo??? www.computing.net/answers/dos/ansi-control-codes-via-echo/4889.html