PDA

View Full Version : Parsing portion of html file into new text files


Camilla
04-09-2005, 06:25 PM
Hi,
I have 40 html files in a folder.
I am trying to Parse portion of text from each html file located in a folder.
I need to take a particular extracted content (from html) as an array and create a text file with same name as it was in html file and storing that portion which was parsed and store in the text file.

The content to be extracted start after "<table><tr><td>" in each html file. So whatever after this "<table><tr><td>" needs to be extracted. The end where we stop extraction and go to the next file for extraction is "</td></tr></table>"

I want to use FSO as below to start with .
Please help me in the rest of the code as i just can't write the rest.
This will be a usefull tool for lot of people so please post it here, pls email me if you need some small jobs. (offcourse paid work)

thanks.


======================
folderPath = trim(Request("fldr"))
if folderPath "" then
set fso = server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(folderPath) then
set chkFldr = fso.GetFolder(folderPath)
================================

mehere
04-11-2005, 06:09 PM
You may want to look at the following links.

http://www.4guysfromrolla.com/webtech/120400-1.2.shtml

http://www.4guysfromrolla.com/webtech/071199-1.shtml

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=61

They should give you an idea of where to go next.