locked
Changing links in Sharepoint pages RRS feed

  • Question

  •  

    I'm not sure where to start here....i have a sharepoint site that links to an external site in over 4000 places and the external site has released a new version with new urls and I need to convert those links in sharepoint to the new links. what is the best approach to accomplish this? i have a spreadsheet with columns for old link and new link.

     

    Thanks in advance.

    Pat  McGovern

    Friday, August 24, 2007 1:33 AM

Answers

  • Best solution I've got is to throw together a quick console application to iterate through all the pages and do the replace.  You'll have to execute the app on a server in the farm.

    I've got a blog post with the c# code to a class that has this functionality, which you could drop into your own app fairly easily.  If you don't have the publishing infrastructure enabled on your portal you'll likely have to strip some lines out of that code.

    http://www.keirgordon.com/2007/08/moss-recursive-search-and-replace.html


    Hope that helps!


    Friday, August 24, 2007 5:10 AM

All replies

  • Best solution I've got is to throw together a quick console application to iterate through all the pages and do the replace.  You'll have to execute the app on a server in the farm.

    I've got a blog post with the c# code to a class that has this functionality, which you could drop into your own app fairly easily.  If you don't have the publishing infrastructure enabled on your portal you'll likely have to strip some lines out of that code.

    http://www.keirgordon.com/2007/08/moss-recursive-search-and-replace.html


    Hope that helps!


    Friday, August 24, 2007 5:10 AM
  • As a follow up, I wanted to remind you that doing a replace in the page source is an easy way to mess up your whole site! So do a backup, and try it on a small test site collection first maybe.
    Friday, August 24, 2007 5:11 AM
  • Stefan,

     

    Thanks! I can use this for sure!

     

    Pat

    Friday, August 24, 2007 11:01 AM