Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to save web page source from DOS command

1,162 views
Skip to first unread message

Jamil

unread,
Jul 15, 2003, 9:24:17 PM7/15/03
to
Hi,
My default browser is Netscape 7.0. I want to save the source of an
opened web page in a text file. Here are the steps I followed so far:

1) From DOS shell, <C:\>netscp "http://www.yahoo.com"> opens the page
in a new window of Netscape.
2) If I then press "Ctrl U", it opens another instance of Netscape
with the HTML source content of that page.

I want to do the 2nd step from DOS shell and save the HTML source
content as a .txt file.

Your help and hints would be very much appreciated.

Thanks.

Jamil.

Charles Dye

unread,
Jul 15, 2003, 10:03:13 PM7/15/03
to

One of the command shells I use on a regular basis, 4NT, supports
FTP and HTTP protocols natively in several commands. So it's
possible to do, for example:

copy "http://www.yahoo.com/index.html" %temp

Which makes a pretty handy way to download files without messing
around with a web browser or FTP client. It's also possible to
upload files via FTP, provided you have passwords granting
appropriate permissions.

4NT can be used in either the DOS-based Windows 98/Me or the non-
DOS-based Windows NT/2000/XP. It can not, however, be used in
"plain" DOS without a Win32 layer. If you're interested,
download a trial copy from http://jpsoft.com

--
Charles Dye ras...@highfiber.com


nos...@bounceall.net

unread,
Jul 16, 2003, 5:11:58 AM7/16/03
to

There may be more help in one of these groups. Search on subject first
snews://secnews.netscape.com/netscape.navigator For 3.x and earlier
snews://secnews.netscape.com/netscape.communicator For 'cator
snews://secnews.netscape.com/netscape.macintosh For all Mac
snews://secnews.netscape.com/netscape.communicator.unix

Ted Davis

unread,
Jul 16, 2003, 9:22:04 AM7/16/03
to
On 15 Jul 2003 18:24:17 -0700, jamilur...@yahoo.com (Jamil) wrote:

Since you are using some version of Win32, you might find WGET
(<http://sourceforge.net/project/showfiles.php?group_id=23617>) useful
(or it might not run). But if you really want to convert the HTML to
texr, lynx is probably the best approach - lynx is a command line
oriented, text mode browser that can be told to get a page and save it
as is or as rendered text (<http://lynx.browser.org/>).

T.E.D. (tda...@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.

Jamil

unread,
Jul 16, 2003, 2:18:23 PM7/16/03
to
Hi All,
It's time to express my thanks to you all for helping me finding a
nice solution. Finally, Ted's solution worked perfectly to meet my
requirements. Just downloaded "LYNX" and used it from the DOS command
shell. To save a web page source in text format, just type the
following from DOS shell:
c:\>lynx -source "http://www.yahoo.com" > c:\myPage.txt

Thanks everyone again for your help.

Jamil.

Ted Davis <tda...@gearbox.maem.umr.edu> wrote in message news:<bujahvof401hac0k6...@4ax.com>...

Ted Davis

unread,
Jul 16, 2003, 4:50:13 PM7/16/03
to
On 16 Jul 2003 11:18:23 -0700, jamilur...@yahoo.com (Jamil) wrote:

>Hi All,
>It's time to express my thanks to you all for helping me finding a
>nice solution. Finally, Ted's solution worked perfectly to meet my
>requirements. Just downloaded "LYNX" and used it from the DOS command
>shell. To save a web page source in text format, just type the
>following from DOS shell:
> c:\>lynx -source "http://www.yahoo.com" > c:\myPage.txt
>

Actually, that saves it in its original form - it is a text file only
if that is what it is on the web. -dump saves html files as
(rendered) plain text.

0 new messages