3

How do shortcuts work when the file that they point to is updated? According to microsoft website they should not work if the original file has been moved, which is what I always thought, but the other day I moved some files into a sub folder and was suprised when the shortcuts to them still worked.

Does it only work when moving to a sub folder?

Is there any way (third party programs included) to be able to move original files so that any shortcuts will still work?

2
  • Why would you need third-party software for something that already happens?
    – Ramhound
    Commented May 24, 2015 at 1:56
  • @Ramhound That last sentence was more for if it didn't always work.
    – Aequitas
    Commented May 24, 2015 at 8:01

1 Answer 1

3

I'm just going to quote Raymond Chen's explanation here:

This feature has been around since Windows 95. If the target of a shortcut no longer exists, the shell tries to resolve the shortcut; i.e., find the object, wherever it ended up moving to. As I explained several months before the question was posted, the algorithm used by the shell varies depending on the operating system and the file system and your domain policies. Possibly also the phase of the moon, one can never be sure.

It's not that Explorer actually keeps track of the files as they move around, just in case you had a shortcut to them. Rather, the shortcut remembers enough information about the file so that if the file moves, Explorer can try looking for it.

The fact that shortcuts can resolve targets means that shortcuts are a handy tool for keeping track of files that might move around. If you want to keep track of a file, you can just create a shortcut to it (you don't even need to save it in a file), and when it comes time to find the file, you just resolve the shortcut.

Be sure to also read the linked Windows Confidential article for more details, especially regarding NT's Distributed Link Tracking Service.

3
  • So it is always resolved if it wasn't on a network drive and you haven't changed tracking options?
    – Aequitas
    Commented May 24, 2015 at 8:03
  • 1
    As per my understanding and experience so far, yes.
    – Karan
    Commented May 24, 2015 at 8:43
  • 1
    Just to add, shortcuts written to WORM media (and even rewritable media like CD-RW/DVD±RW discs) will not be updated for obvious reasons.
    – Karan
    Commented May 24, 2015 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .