Solved

How do I change links sitewide with just one command?

Posted on 2004-04-01
4
197 Views
Last Modified: 2010-04-25
I'm looking to update a large number of pages at the same time.  The pages have been moved from one directory to another and the links need to be updated.  I'm looking to do this with one command rather than having to open up each page by hand and do it that way.  Is there a command that will do it for me so I can save a large amount of time?  Thanx in advance.

Matt
0
Comment
Question by:bower515
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:Havin_it
ID: 10733015
If you're working in DWMX or better, this is a doddle.  Just re-define the site and set its root according to the changed location of the new pages, and the rest should be done automatically.  If you haven't yet defined a site for the pages you're working on, I think it's still relatively easy so get back to me in that case.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10733041
Well it depends.  If you used relative links then Havin_it's suggestion may work.

If you used absolute links then you will most likely have to do a find and replace site wide.  It also depends on if they have moved to a completely new location or just up/down in the existing directory structure.
0
 
LVL 14

Accepted Solution

by:
Esopo earned 125 total points
ID: 10736982
I agree with mrichmon, Havin_it's suggestion depends on the structure of your site. If it doesn't help you, a Find & Replace might.

To perform a Find & Replace in your entire site do something like this:

Open the file & replace dialog (Ctrl + F or select from the Edit menu)

FIND IN: Entire current Local Site (or select the folder to work with)
SEARCH FOR: Source Code
SEARCH: href="
REPLACE WITH: href="folder/
OPTIONS: Ignore white space differences

-REPLACE ALL-

This should add a folder root to every link in your site or folder you choose. You can use this dialog in many ways, like removing a folder searching for - href="folder/ - and replacing with - href=" -. You get the idea.

Word of advice... back up your files before playing with this ;-)

Best regards,

Esopo.
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 10744501
I am confused as to why you simply accepted Esposo's answer without splitting the points since he just agreed with my solution, but gave some more details as to the exact buttons to click.

I could have provided this, but you did not ask.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question