Page 1 of 1

Lister on a junction folder: how to show destination path?

Posted: 2020-08-20, 11:01 UTC
by wanderer
There may be a plugin for this but i'd like to request that when on a folder and pressing F3, for Lister to show a junction's destination path.

Re: Lister and Junctions

Posted: 2020-08-20, 18:31 UTC
by petermad
I do this with a saved search:

Code: Select all

[Searches]
LNK_SearchFor=
LNK_SearchIn=
LNK_SearchText=
LNK_SearchFlags=0|000002000020|||||||||0000|
LNK_plugin=""tc.file type" = "reparse point""
and a user-defined help text:

Code: Select all

[HintsCustomField]
0exts=>LNK
0fields=[=ntlinks.RP_Target]  ([=ntlinks.Obj_Type])
see: https://madsenworld.dk/tcmd/lnkhelp1.png and https://madsenworld.dk/tcmd/lnkhelp2.png

Using the plugin: NTLinks 1.6.0.244 - https://totalcmd.net/plugring/ntlinks.html

Re: Lister and Junctions

Posted: 2020-08-20, 19:40 UTC
by Hurdet
to me:
LNK_plugin=""tc.file type" = "reparse point""
find only folder symbolic link
LNK_plugin="tc.file type" = "reparse point" | ntlinks.Obj_Type = Symlink
find folder and file symbolic link
but i'm not able to find hardlinks.

Re: Lister and Junctions

Posted: 2020-08-20, 23:25 UTC
by petermad
2Hurdet
This should find Junction, SymlinkD, Symlink and Hardlink

Code: Select all

LNK_SearchFor=
LNK_SearchIn=
LNK_SearchText=
LNK_SearchFlags=0|002002000020|||||||||0000|||
LNK_plugin="tc.file type" = "reparse point" | ntlinks.Obj_Type = Symlink | ntlinks.HLNK_Count > 1
And this could show help text for them:

Code: Select all

[HintsCustomField]
0exts=>LNK
0fields=[=ntlinks.Obj_RealPath]  ([=ntlinks.Obj_Type])
The path for hardlinks will always be current path.

-------------

If you want all the paths for hardlinks then use:

Code: Select all

HLNK_SearchFor=
HLNK_SearchIn=
HLNK_SearchText=
HLNK_SearchFlags=0|002002000020|||||||||0000|||
HLNK_plugin=ntlinks.HLNK_Count > 1
LNK_SearchFor=
LNK_SearchIn=
LNK_SearchText=
LNK_SearchFlags=0|002002000020|||||||||0000|||
LNK_plugin="tc.file type" = "reparse point" | ntlinks.Obj_Type = Symlink
and:

Code: Select all

[HintsCustomField]
0exts=>LNK
0fields=[=ntlinks.Obj_RealPath]  ([=ntlinks.Obj_Type])
1exts=>HLNK
1fields=Hardlinks: [=ntlinks.HLNK_Paths]
EDITED typo in code here above.

Re: Lister and Junctions

Posted: 2020-08-21, 06:23 UTC
by Hurdet
1fields=Hardlinks: [=ntlinks.Hard Copies}
has a small typo. I think:
1fields=Hardlinks: [=ntlinks.Hard Copies]
but so it show only file "filename Hardlinks: [EMPTY]"
I not have [=ntlinks.Hard Copies] but [=ntlinks.HLNK_Count]
do you mean this?

Re: Lister and Junctions

Posted: 2020-08-21, 08:01 UTC
by Dalai
IMO it doesn't make any sense to show the target for hard links because they don't have any target since they're not links like symbolic links or junctions. A hard link is just another entry in the MFT for the exact same file, nothing else.

Regards
Dalai

Re: Lister and Junctions

Posted: 2020-08-21, 09:38 UTC
by petermad
2Hurdet
1fields=Hardlinks: [=ntlinks.Hard Copies}
has a small typo. I think:
1fields=Hardlinks: [=ntlinks.Hard Copies]
but so it show only file "filename Hardlinks: [EMPTY]"
I not have [=ntlinks.Hard Copies] but [=ntlinks.HLNK_Count]
do you mean this?
Yes, there was a typo (} -> ]). and sorry - [=ntlinks.Hard Copies] is the user friendly name shown in the dialogs (English) - the generic code is: [=ntlinks.HLNK_Paths]

This should show all the paths for the current hardlink - see: https://madsenworld.dk/tcmd/hardlinkpaths.png

I have edited my post above accordingly.

Re: Lister and Junctions

Posted: 2020-08-21, 10:09 UTC
by Hurdet
ty

Re: Lister and Junctions

Posted: 2020-08-21, 11:24 UTC
by wanderer
Hey petermad,

Thanks for the solution, i implemented it but i had to enable "Show filename as tooltip", which i had disabled.

In any case, my request still stands. Showing the selected junction's target in Lister is as simple as your solution, and is hopefully also simple to implement.

Re: Lister on a junction folder: how to show destination path?

Posted: 2020-08-31, 06:46 UTC
by MVV
I usually use mentioned pattern because TC's internal field ignores symlinks to files:

Code: Select all

"tc.file type" = "reparse point" | ntlinks.Obj_Type = Symlink
And, I hate internal Lister reaction on directories, it causes time lost every time I accidentally press F3 on a directory, so I use NoDirQuickView plugin that disables standard info page.

But I agree that reparse point target path is important enough to show it in standard directory preview.

Re: Lister on a junction folder: how to show destination path?

Posted: 2024-01-03, 08:49 UTC
by wanderer
Refining this request, it would be nice if F3 on a dir worked like this:

Line 1: Selected path
Line 2: Junction target path
Line 3: Empty
Line 4: Start counting occupied space and display it after having displayed the above.

In other words, don't show "..." when opening Lister and show everything after the subfolder count has finished, but rather show the first 3 lines and then in Line 4 show "..." until the count has finished, then remove "..." and show the results.

An INI flag could also exist that would prevent TC from counting subfolders and just show the first 2 lines (i.e. NoFolderCountInLister=1).

Re: Lister on a junction folder: how to show destination path?

Posted: 2024-01-03, 16:55 UTC
by AntonyD
it would be nice if F3 on a dir worked like this:
Support+++++++++++++