Is it possible to track and update .lnk targets like vanilla explorer can?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

In vanilla explorer if I move a file or directory that has a shortcut to it somewhere else in the system, the shortcut won't break and will instead update its target location.
Moving shortcut targets inside XY breaks the shortcut since it'll point to the old (nonexistent) location.

Is this vanilla explorer behavior something I could achieve with a script that would check if the item has a shortcut pointing to it on all move/rename operations? It's not ideal having to recreate a whole bunch of shortcuts if I need to move things around.

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

Mh?

In Windows Explorer, Windows Server 2019 x64:

I have:

Code: Select all

E:\tst

with 2 folders inside of it:
E:\tst\a
E:\tst\b
If I create a normal shortcut by right clicking E:\tst\b and use "Create shortcut"
I now have: E:\tst\b - Shortcut.lnk
Now I move this shortcut one level up so I get: E:\b - Shortcut.lnk

Now I rename E:\tst to E:\testing
but the E:\b - Shortcut.lnk will still point to E:\tst\b and NOT to E:\testing\b?
One of my scripts helped you out? Please donate via Paypal

RalphM
Posts: 1937
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by RalphM »

Not sure if OP is referring to Windows Explorer with Vanilla, there is apparently a Vanilla Explorer for Android out there.
Only OP can answer this.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

Here's a video showing that the shortcut doesn't break when moving or renaming the target file:

https://mega.nz/file/w3JjQCCK#jbG-9cxXw ... c8aQluxEZQ

@RalphM: vanilla windows 10 explorer, no idea that was a thing for Android :o

EDIT:

@highend: here's a video recreating your scenario: https://mega.nz/file/Q6w3FSBJ#nXr3_-_2W ... -DGmIYR_nk
You can see the target change after it is accessed

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

You can see the target change after it is accessed
That's the key, after it has been accessed.

That's the same behaviour I can see within XYplorer, no difference.
One of my scripts helped you out? Please donate via Paypal

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

That's not what I'm experiencing, here's a video of the shortcut breaking during the same operation in XY:
https://mega.nz/file/Z3wliAiT#HneJkrAoh ... gx2jyu1eEU

Is there a configuration setting I'm missing?

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

Start a fresh instance by executing fresh; from the address bar. Does it work there?
One of my scripts helped you out? Please donate via Paypal

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

Nope. It's literally the same result as in the above video. I take it you have a different result from mine?
I'm on version 21.40, so afaik that's the latest release.

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

v21.40, fresh instance (apart from hiding the tree and disabling dual pane), video attached...
1.zip
(568.8 KiB) Downloaded 47 times
One of my scripts helped you out? Please donate via Paypal

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

I'm able to reproduce your result with renaming the text file, but I'm not getting the folder behavior. Are you not getting the 'location unavailable' message when trying to open a shortcut to a moved or renamed directory?

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

Right click the "Open with" button in the toolbar and untick
Open Items by First 'Open With...' match

Try it again with a folder (link)
One of my scripts helped you out? Please donate via Paypal

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

This results in the more standard error message:
Untitled.png
Untitled.png (5.86 KiB) Viewed 1226 times

highend
Posts: 13357
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by highend »

Funny, I don't get that error message...

Maybe Don can shine some light on it if it should work or why it doesn't...
One of my scripts helped you out? Please donate via Paypal

o7blue
Posts: 93
Joined: 22 Dec 2020 07:10

Re: Is it possible to track and update .lnk targets like vanilla explorer can?

Post by o7blue »

This is probably the first time I've gotten the short end of the 'but it works on my machine' stick :biggrin:
Clearly, the only solution now is for me to spin up a VM of your configuration :whistle:

But in all seriousness, I hope this isn't a big bug to fix.

Post Reply