Solved

How do I change links sitewide with just one command?

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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 …
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

773 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