1.

Solve : Avoiding breaking links when folder moves?

Answer»

This may be a common question, but I have a need to maintain a set of folders for CLIENTS' files, and to reference files within these folders as "links" in e-mail, Outlook and other programs.  Problem is, I often need to move or rename these folders as the client relationship changes, therefore breaking the link.

I have TRIED setting up file shortcuts to these folders, because the shortcut reference automatically updates when the folder name is changed or it is moved.  But a link using this shortcut translates back to the full folder sequence, putting me back right were I started.

Do you have any recommended way to do this?

In summary, to set up links to files that survive if the folder is moved or renamed.

Thanks,
Paul   Not a common question in this context, however it is a bit of a problem when it comes down to web design. Now since I'm not familiar with this sort of situation, I'll try and give you and understanding of the web design point of view and it might help.

You get two types of links, absolute and relative. You have what are called absolute links, which only go to the one specific filepath. In HTML, you can use relative links. These assume that the first part of the link is the same as where the file the link contains is.

Erm, I think an example will help. Let's say we have a file "C:\Website\index.htm", in which we have a link to a picture at "C:\Website\Pictures\pic.jpg".

If you were to use an absolute link to get the picture, you would need to type in the whole path (ie "C:\Website\Pictures\pic.jpg"). However, with an absolute link, you simply use "Pictures\pic.jpg".

The advantage of having a relative link is that you can move some files around and the links will remain. However, the directory structure must be maintained, so you cannot get AWAY with changing the path to "C:\My Site\Pics\pic.jpg".

Whether this will help or not depends upon exactly how you have the system arranged. If this does not help then I'm afraid that it'll be quite a task to change it.

The only way you might get around this is to use a bit of scripting. If this is like an intranet with information for your clients, you could give each document a unique ID, and put this UID into a link to a blank page which searches the directory structure for the file and redirects to it. Something like this would be very kludgy and slow, but it might work.Thank you for your thorough DESCRIPTION.  While I don't need this link structure in web design, I believe the problem is the same.  I need the links to be stored e-mail and Outlook messages, and not be broken when the folders move.  But I guess it just can't be done.

Do you hear me Bill Gates??  C'mon, there must be some way you can support this.

Paul
Well technically it can be done with sharing and/or active directory on a network.

Instead of linking to c:\myfiles\myfile.txt, you would create a share on the folder myfiles, maybe mysharedfiles.  Then you link as \\mycomputername\myfiles\myfile.txt.

When you move the files to another folder say myfiles2, then your remove the share from myfiles and add a share to myfiles2 with the same name as the previous share.

If you want to do this across computers then you manage the share in active directory.

Now if you are doing this on a web server like IIS that you can control you repoint your virtual directory to the new folder and leave the virtual directory name the same.  If you are doing this on a web server that you do not control then I suggest coming up with a better plan that INCLUDES not moving the files.

Too much information???

GaryNo, not too much information.  I'll see what I can do with this.

Thanks!



Discussion

No Comment Found