Forum Moderators: phranque

Message Too Old, No Replies

Updating thousands of html pages

this tip will save some of you hours!

         

Chris999

5:15 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



I often see threads on this forum saying "It would take me ages to update my pages, I have thousands."

You can update html in thousands of pages using a freeware tool called Search and Replace 98.

Even though I usually generate my static html from an Access database i find this is the most valuable tool I have for quickly updating my content.

The beauty of this tool is the fact you can specify multiple lines to replace. So you give it a few lines of html to replace and it will wizz through all your pages.

An example would be changing the title of all your static pages, your keywords tag, or updating AdSense code.

[edited by: Chris999 at 5:17 pm (utc) on April 1, 2006]

hal12b

5:17 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



Don't forget about using include pages too.

Andrew Bassett

6:04 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



Yeah.. I avoided that headache altogether; just make all my sites dynamic.

Mentat

6:09 pm on Apr 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



SSI is the word for this :)

Chris999

8:07 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



Yes server side includes are the way forward.

But many webmasters just write thousands of articles without implementing any sort of SSI system. This helps update those pages.

mm1220

8:31 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



SSI is the word for this :)

PHP, all the way. The syntax for including files is really as simple as SSI but the exposure to PHP code will stand people in good stead when they go messing around with PHP based forums and CMSs.

djohnson

8:42 pm on Apr 1, 2006 (gmt 0)

10+ Year Member



PHP + mySQL here. Since I do this for work, guess what all of my sites are written in... :) Since google may or may not like php pages, a simple .htaccess file converts all .php to .html. Keeps everything nice and simple.

eeek

1:39 am on Apr 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can update html in thousands of pages using a freeware tool called Search and Replace 98

Or you could just use perl:

perl -pi -e 's/oldstuff/newstuff' *.html

mm1220

9:31 am on Apr 2, 2006 (gmt 0)

10+ Year Member



Or you could just use perl

He could, but seeing as he uses Access and an editor with '98' in the title it's a safe bet that he's using windows and is unlikely to have a perl install handy.