Open Certain LNK/URL/Location in Native FileExplorer?

Features wanted...
Post Reply
nutnutwin
Posts: 30
Joined: 26 May 2020 02:00

Open Certain LNK/URL/Location in Native FileExplorer?

Post by nutnutwin »

# Background
As is mentioned in
viewtopic.php?f=2&t=21757
sometimes accessing network location(SMB mounted folder) can be slow(or faster on some other occasions)

# My Wish
While registering XYplorer as default FileExplorer is EXTREMELY convenient,
wonder if it's possible to open certain .lnk files in native FileExplorer

eg. I have an lnk to "SomeRemoteFolder\SomeSubFolder"
When double click on this lnk(Shortcut), "SomeSubFolder" be opened in explorer.exe
(Sometimes it is a remote folder mounted as a drive

# Why I need this
As is described above, opening some remote folder in XYplorer is very slow in my Company environment.
while in NativeFE, it is far faster.

Don't know why.

Thank you.

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

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by highend »

Not possible, managed by the OS, not by XY
One of my scripts helped you out? Please donate via Paypal

Horst
Posts: 1331
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by Horst »

Try to create a button which invokes Explorer.exe using the lnk entry from the list as parameter.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

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

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by highend »

It sounds like he wants to be able to double click on a link outside of XY. If not he could easily script that and use it for a custom file association...
One of my scripts helped you out? Please donate via Paypal

Horst
Posts: 1331
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by Horst »

highend wrote: 15 Aug 2021 15:15 It sounds like he wants to be able to double click on a link outside of XY
Ok, then he has no chance as you said.
Windows 11 Home, Version 25H2 (OS Build 26200.7171)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

nutnutwin
Posts: 30
Joined: 26 May 2020 02:00

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by nutnutwin »

highend wrote: 15 Aug 2021 15:15 It sounds like he wants to be able to double click on a link outside of XY. If not he could easily script that and use it for a custom file association...
Hi, I am trying to double click on lnk within xyplorer, and open in Native FE.
which sounds impossible for now.

So far I tried, setting xy as non-default File Explorer(where double click open in Native FE)
when the window open, judge if the window should have been opened in xyp,
open if yes.

a little overly complicated, and bad performance...

Thank you for your reply.

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

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by highend »

No, it's NOT impossible when done inside XY^^

Code: Select all

    $openInExplorer = <<<>>>
\\<server>\<share>
\\<server>\<share>\<subfolder>
    >>>;
    $resolved = property("#LinkTarget", <curitem>);
    if (exists($resolved) == 2) {
        foreach($item, $openInExplorer, <crlf>, "e") {
            if (strpos($resolved, $item) != -1) {
                openwith "explorer", , $resolved;
                end true;
            }
        }
        goto $resolved;
    } else {
        open $resolved;
    }
Save that as "Open lnk to shares.xys" file in your scripts folder and insert all the shares that you want to open via Windows Explorer in

Code: Select all

    $openInExplorer = <<<>>>
--- your shares belong here ---
    >>>;
Then create a custom file association entry
"Open lnk" lnk>::load "Open lnk to shares.xys";

Afterwards right click the CFA icon in the toolbar and make sure that "Resolve Shortcuts before Matching" is turned off

And from now on any network path (.lnk) file that contains the <server>\<share>\[a subfolder] from the $openInExplorer variable will be opened by Windows Explorer and all others inside XY...
One of my scripts helped you out? Please donate via Paypal

nutnutwin
Posts: 30
Joined: 26 May 2020 02:00

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by nutnutwin »

Will try this trick after reading more about XYP scripts(never thought of using that)
Last edited by nutnutwin on 21 Aug 2021 10:37, edited 1 time in total.

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

Re: Open Certain LNK/URL/Location in Native FileExplorer?

Post by RalphM »

And you needed the full quote of the previous post for this?
If your reply is just in line with what was said above, there is really no need for any quoting.
Ralph :)
(OS: W11 24H2 Home x64 - XY: Current x32 beta - Office 2024 32-bit - Display: 1920x1080 @ 125%)

Post Reply