Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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?

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)

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.......lolCopy 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.htmHope this helps. Oh! Code is not mine.
Don't want any one thinking I have a clue.World Library

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?ò

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.htmecho @prompt $lHEAD$g$lTITLE$gTest$l/TITLE$g$l/HEAD$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htmecho @prompt Whatever$lP$g$lHR$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htmecho 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.htmecho @prompt $l/HTML$g > tmp$$$.bat
%comspec% /e:2048 /c tmp$$$.bat >> test.htm

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.

Sure! Read my FAQ ;-).
http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#33http://home7.inet.tele.dk/batfiles/main/batchfaq.htm#36

![]() |
![]() |
![]() |

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