Computing.Net > Forums > Disk Operating System > Save html page from prompt

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.

Save html page from prompt

Reply to Message Icon

Name: JanLee
Date: August 29, 2002 at 06:48:46 Pacific
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: August 29, 2002 at 16:29:05 Pacific
Reply:

sed with a redirect symbol:

echo line one> FILE.EXT
echo line two>> FILE.EXT

However, 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#21

Besides 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


0

Response Number 2
Name: Secret_Doom
Date: August 29, 2002 at 16:32:22 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


dos printer drivers ASTDK what??????????????...



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: Save html page from prompt

Old select command equivalent www.computing.net/answers/dos/old-select-command-equivalent/11428.html

Saving source of a web page www.computing.net/answers/dos/saving-source-of-a-web-page/13275.html

How to run a live update from prompt www.computing.net/answers/dos/how-to-run-a-live-update-from-prompt/5034.html