Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi, Friends,
I would like need to save an html page from
prompt, I heed the source code to put it into
a MSDOS program.Thank you
Jan Lee

sed with a redirect symbol:
echo line one> FILE.EXT
echo line two>> FILE.EXTHowever, HTML pages are full of greater-than and lower-than characters, which cannot be ECHOed into files. Nevertheless, there are other ways out:
FAQ #21 - ECHO any non-ECHOable character
http://www.batch.hpg.com.br/index.htm#21Besides the two methods described in that URL, you could also include the HTML file into the batch file, something like this:
===== BATCH SCRIPT BEGIN =====
@echo off
echo %0? |FIND/i ".BAT?" > nul
if not errorlevel=1 set THIS=%0
if errorlevel=1 set THIS=%0.BAT
set id= %=%
set id=%id%%id%
FIND "%id%" < %THIS% > file.dat
for %%? in (this id) do set %%?=
goto eof:: Put below the HTML code. Note that
:: the begginnig of each line must
:: contain a double space, and no other
:: lines from the batch file may contain
:: such string.[html]
[body]
some text
[/body]
[/html]:eof
===== BATCH SCRIPT END =====I've used [brackets] instead of < t h e s e > because of posting troubles.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

The begginning of my post was cutted (my fault). It started like this:
You mean you want to create a HTML file via batch file? You can create "common" text files with the ECHO command used with ...
(the rest was posted)
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br

![]() |
dos printer drivers
|
ASTDK what??????????????...
|

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