We help IT Professionals succeed at work.

cmd line way to use netscape browser to convert htm to txt??

Jeffgo
Jeffgo asked
on
As part of a windows nt batch file script, I need
a command line way to do the following:

Start up the winnt netscape browser, read in a local html file, and then do a  "save as" and save
the file as txt. Then exit the netscape browser.

Perhaps a command something like:

  nscpehtm2txt c:\xxx\file.htm

After the cmd is finished I should have file.txt in the same directory as file.htm

I'm not sure if java is the way to do this?
I'm not a java programmer. Can anybody help??



Comment
Watch Question

Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
But a html file is already a text file.
I don't understand the conversion u wish to make.

Author

Commented:

I need to end up a plain text file (without all the html junk).

I have tried many third party cmd line html to text converters but the netscape
browser seems to best preserve the formating of the html file when it gets saved
as a plain text file.
Java Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
Don't think Netscape supports doing what you want from the command line.
You could have a look at developer.netscape.com to check.

If it doesn't then you'll need to find a 3rd party command line tool that meets your needs.
Well, why don't you just parse the html and retrieve the text?
It's not so difficult, I think...
If you choose the approach, I'll try to help you.

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for objects

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Venabili
EE Cleanup Volunteer