afidegnum Posted April 11, 2011 Share Posted April 11, 2011 (edited) 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.comwhere 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 straightI will be grateful if you can please help provide a clean step approach to achieve this stepThanks 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 April 11, 2011 by afidegnum Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 12, 2011 Share Posted April 12, 2011 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now