tags:

views:

22

answers:

3

Looking for ideas / recommendations on finding and replacing a link in all pages of a site, and using Dreamweaver (ick) is not an option. The site consist of 100s of static pages.

A: 

What about something like TextPad or Notepad++? You can open up all your html files and then find/replace in all open documents.

Pat
It occurred to me to use Notepad++, but we're talking several pages here.
gnome
A: 

In Linux/Unix or cygwin (or similar)

$ find topdir -name \*.html -print0 | 
   xargs -0 sed --in-place
   -e 's~http://foo\.com/this/that\.html~http://foo.com/other/location/newfile.html~g'

(line wrapped for readability)

Edit all files in-place under the directory "topdir" replacing the "/this/that.html" url with "/other/location/newfile.html" url.

Stephen P
+1  A: 

In unix, vim has an option to do that.

vim -c "argdo %s/http:\\site.com\/pageA/http:\\site2.com\/pageB/ge | update" *.html
EricR