Jump to content
Sign in to follow this  

Need help Looping folder, Open file search for HTML string, submit form.

Recommended Posts

Hi Good morning,

Please I am trying to migrate an existing plain site containing more than 15,345 html files. to a CMS site where contents shold be saved in database instead of plain files. The issue now is, I would like to loop in a folder called C:\Users\JEANNE\Documents\bulffile , Open Each Files, Search for a content of a div class:

<div class="rbcontent"> content ........</div>

Post each of such content from each files in the said folder to a web form http://www.domain.com

where the form class is "content" form. and save.

Repeat the same procedure till all end.

I have been reading about looping folders, and using regular expressions. but I still can't get my head straight

I will be grateful if you can please help provide a clean step approach to achieve this step

Thanks in advance.

NB: To put more emphasis, from selecting a part of the matching content from the text file, I think we need to open, maybe Regular or inStr to seleect and copy the content into the clipboard before pasting it into teh web form.

Let me know your suggestion.

Edited by afidegnum

Share this post

Link to post
Share on other sites

Have you looked in the _IE* functions of the IE.au3 UDF (see help file)?

Are they .htm/.html files? You don't have to do string manipulation of these files, since you could do things like get a collection of all DIV tags with _IETagNameGetCollection(), then loop through that collection to process further.

How far did you get? Do you have a file list from the directory and loop that will access those files in a loop?


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...