Page 1 of 1
Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 11 Aug 2021 08:40
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.
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 15 Aug 2021 12:55
by highend
Not possible, managed by the OS, not by XY
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 15 Aug 2021 15:13
by Horst
Try to create a button which invokes Explorer.exe using the lnk entry from the list as parameter.
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 15 Aug 2021 15:15
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...
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 15 Aug 2021 15:17
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.
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 16 Aug 2021 00:46
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.
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 16 Aug 2021 01:21
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...
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 21 Aug 2021 09:02
by nutnutwin
Will try this trick after reading more about XYP scripts(never thought of using that)
Re: Open Certain LNK/URL/Location in Native FileExplorer?
Posted: 21 Aug 2021 10:29
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.