Solved

How do I change links sitewide with just one command?

Posted on 2004-04-01
4
189 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now