Page 1 of 2

Hardlinks and Junctions

Posted: 19 May 2006, 12:36
by SvA
Mystico's request for virtual folders caused me to search for the ability to create hardlinks and junctions. But I could not find it in Servant Salamander.

I used to create hardlinks from the command line and it never appeared to me, that it was so much more comfortable and easy create from within Salamander.

Hardlinks and junctions overlap somewhat with Mysico's idea of a virtual folder but are restricted to the same volume. On the other hand these file system objects appear to the whole system as real files and folders, not just to Salamander.

Posted: 23 May 2006, 03:21
by zarevak
Hi,
just a summary from Czech thread about similar topic Full linkovanie na NTFS - "Junction point":
- creating Junction Points
- viewing Junction Point links (to be able to see, where the link goes)
- editing Junction Points (to be able to change the link target)
similar functionality would be needed for Hardlinks...

From another (Deleting a NTFS hardlink/junction) topic:
- plan to change Delete command to Unlink for Junction Points


Temporarily you can use MakeLink.exe from Mike Nordell hosted on The Code Project along with sourcecode
Usage:
makelink empty_folder target - creates Junction point from empty_folder to target
makelink /L junction_point - show the Junction point target
makelink /D junction_point - unlinks Junction point


For using in SS (at least 2.5RC1) you can add UserMenu item:

Code: Select all

Command: MakeLink.exe
Arguments: $(DirToCompareActive) $(DirToCompareInactive)
Initial directory: $(FullPath)
I suggest to uncheck "Close shell window" to see potential error messages.

Posted: 02 Jun 2006, 15:42
by Petr Solin
zarevak wrote:Hi,
just a summary from Czech thread about similar topic Full linkovanie na NTFS - "Junction point":
- creating Junction Points
- viewing Junction Point links (to be able to see, where the link goes)
You can view target path of junction point when you enter it and use Drive Info (Ctrl+F1) command.
zarevak wrote:From another (Deleting a NTFS hardlink/junction) topic:
- plan to change Delete command to Unlink for Junction Points
I have just finished it, it will be available in next version (RC2).

Posted: 02 Jun 2006, 23:01
by zarevak
Petr Solin wrote:You can view target path of junction point when you enter it and use Drive Info (Ctrl+F1) command.
Petr Solin wrote:delete without recursive file remove - I have just finished it, it will be available in next version (RC2).
Thank you! Much appreciated ;)

Hardlinks and Junctions

Posted: 30 Oct 2009, 13:15
by mdruiter
Petr Solin wrote:You can view target path of junction point when you enter it and use Drive Info (Ctrl+F1) command.
I understand the Enter, but what should Ctrl+F1 add to that? :?

Furthermore, is it by design that Ctrl+T ("Go to the target of the focused shortcut (.lnk file)") does not work on directory junctions, but only on files (also non-.lnk links)?

Re: Hardlinks and Junctions

Posted: 30 Oct 2009, 13:30
by mdruiter
mdruiter wrote:I understand the Enter, but what should Ctrl+F1 add to that? :?
Wait, I understand it now: for junctions and directory symlinks, it shows the link (next to Local Disk)!
For junctions with denied read permission (such as "C:\Documents and Settings" in Vista), Salamander jumps to the target at Enter 8) (whereas Explorer just denies), so Drive Type cannot show the link source there.

Re: Hardlinks and Junctions

Posted: 30 Oct 2009, 13:34
by Petr Solin
I have junction point F:\test leading to C:\hudba. When I enter F:\test (path F:\test is in panel) and use Drive Info command (it has Ctrl+F1 hotkey), I can see "Drive type: Local Disk (junction to: C:\Hudba)" on the third row in Drive Information dialog.

Ctrl+T is only for .lnk files.

Re: Hardlinks and Junctions

Posted: 30 Oct 2009, 14:37
by zarevak
Hi, is there a way how to find the target location in Salamander without entering the folder? I had a junction point, which lead to some unavailable target and I didn't know where :(

Re: Hardlinks and Junctions

Posted: 30 Oct 2009, 14:57
by Petr Solin
zarevak wrote:Hi, is there a way how to find the target location in Salamander without entering the folder? I had a junction point, which lead to some unavailable target and I didn't know where :(
Probably no, sorry. If you can't find any command line utility for displaying junction points targets, I can send you source code of this rutine. ;-)

Re: Hardlinks and Junctions

Posted: 30 Oct 2009, 15:35
by zarevak
Petr Solin wrote:
zarevak wrote:Hi, is there a way how to find the target location in Salamander without entering the folder?
Probably no, sorry. If you can't find any command line utility for displaying junction points targets, I can send you source code of this rutine. ;-)
Thank you. It was just minor issue so I ignored it. It would be nice feature for Salamander though ;)

Re: Hardlinks and Junctions

Posted: 01 Nov 2009, 14:35
by mdruiter
Petr Solin wrote:Ctrl+T is only for .lnk files.
I thought I saw it work for linked files too, but apparently not. :wink:
It would be useful if it also worked for linked files, to be able to see where it points to. One cannot "enter" it like a directory...

Re: Hardlinks and Junctions

Posted: 01 Nov 2009, 21:49
by Petr Solin
Maybe we should add support for reparse points (mount points, junctions, and symlinks) to Go to Shortcut Target command (Ctrl+T). :wink: It would also solve problem with inaccessible target directory (it could display some error message containing target path).

Re: Hardlinks and Junctions

Posted: 01 Nov 2009, 22:27
by Ether
Petr Solin wrote:Maybe we should add support for reparse points (mount points, junctions, and symlinks) to Go to Shortcut Target command (Ctrl+T). :wink: It would also solve problem with inaccessible target directory (it could display some error message containing target path).
+1

Re:

Posted: 03 Dec 2009, 02:40
by Georgd
zarevak wrote:just a summary from Czech thread about similar topic Full linkovanie na NTFS - "Junction point":
- creating Junction Points
- viewing Junction Point links (to be able to see, where the link goes)
- editing Junction Points (to be able to change the link target)
Did anything happen on that front in the Czech forums?

CTRL+T - support for reparse points (mount points, junctions, and symlinks) as suggested by Petr Solin above is nice, but before I want to follow them I need to create & edit them ;) I care most about symlinks like stated in http://forum.altap.cz/viewtopic.php?f=3&t=3631&start=0 because they offer comfortable use of encrypted volumes for windows standard directories.

Re: Hardlinks and Junctions

Posted: 03 Dec 2009, 09:28
by Petr Solin
I have just tried Manison's new plugin Automation. It adds command Make Link for creating symlinks. I believe other needed commands can be added too, supplied sample script just runs mklink utility.