Page 1 of 1

Hard Link Support

Posted: 21 Jun 2008 22:13
by lam
Hi

Can anyone tell me if XYplorer supports displaying NTFS hard links?

I would also like to be able to see the 'target' that these links point to.

Thanks

lam

Posted: 22 Jun 2008 01:17
by serendipity
Hi and Welcome to XY forum,
While I might not be able to answer this question, you might want to check out a similar request:
http://www.xyplorer.com/xyfc/viewtopic.php?t=1671&

Very often if more than two people ask for the same feature then admin does consider them. So hang on until admin has a say on this. :)

Posted: 22 Jun 2008 06:02
by lam
Serendipity

Thank you.

I believe this would be a great addition to XYplorer.

With the proliferation of Hard Links, Symbolic Links and Junction points in Vista, it can be very important to be able to easily spot these and enumerate where they point to.

There are a few utilities that can do this, but having the integration a product like XPplorer would be a real benefit.

Thanks again.

Posted: 22 Jun 2008 06:16
by j_c_hallgren
lam wrote:With the proliferation of Hard Links, Symbolic Links and Junction points in Vista, it can be very important to be able to easily spot these and enumerate where they point to.
First, I'll extend my welcome as well!

To make sure you know, XY does presently handle and show Junction points, so it's the Hard Links that would likely be next addition...and as Don said, once a few people ask for same thing, it moves it up the list...I'm not using these features so I can't add myself to list of reqestors...sorry!

Posted: 22 Jun 2008 08:08
by admin
Okay, did a little research. Creating Hard Links is easy as a cake. But to see the 'target' that these links point to... I don't find anything about this. :? Does any of you know of a software that can do this??? (read: is it possible at all?)

EDIT: As I understand it, the concept of "target" does not make sense with hard links. You simply got 2 (or more) entries in the file system pointing to the same bytes on the hard disks. There is nothing like a link and a target here.

Posted: 22 Jun 2008 08:38
by j_c_hallgren
admin wrote:EDIT: As I understand it, the concept of "target" does not make sense with hard links. You simply got 2 (or more) entries in the file system pointing to the same bytes on the hard disks. There is nothing like a link and a target here.
Well, I'm a total novice on this subject, but M$ describes hard links as:
A hard link is an NTFS-only based link to a given file. When you create a hard link to a file on an NTFS volume, NTFS adds a directory entry for the hard link without duplicating the original file. By creating hard links you can:
• Use the same file name as the original file but appear in different folders.
• Use different file names from the original file but appear in the same folder.
• Use different file names from the original file and appear in different folders.
so based on that desc, I'm thinking that "lam" would like to know what the original file name is as 'target', but how you'd locate that, I have no clue.

Posted: 22 Jun 2008 08:42
by admin
j_c_hallgren wrote:
admin wrote:EDIT: As I understand it, the concept of "target" does not make sense with hard links. You simply got 2 (or more) entries in the file system pointing to the same bytes on the hard disks. There is nothing like a link and a target here.
Well, I'm a total novice on this subject, but M$ describes hard links as:
A hard link is an NTFS-only based link to a given file. When you create a hard link to a file on an NTFS volume, NTFS adds a directory entry for the hard link without duplicating the original file. By creating hard links you can:
• Use the same file name as the original file but appear in different folders.
• Use different file names from the original file but appear in the same folder.
• Use different file names from the original file and appear in different folders.
so based on that desc, I'm thinking that "lam" would like to know what the original file name is as 'target', but how you'd locate that, I have no clue.
Well, I don't think that this information is existing anywhere in the file system. Because it is totally irrelevant.

Posted: 22 Jun 2008 08:58
by j_c_hallgren
admin wrote:Well, I don't think that this information is existing anywhere in the file system. Because it is totally irrelevant.
Like I said, I'm just guessing here, but as I read it, links are a variant of a shortcut, right? So the target would be similar as those...reading the online docs for Dir Opus, I find:
Opus now includes support for links/junctions. The Type column will display the type of link and the Description column will now show the target of junctions (and soft-links under Vista) as it does for shortcuts.
so it appears it may handle them...and later it says that junctions are for folders, and hardlinks are for files, so that implies they are similar...and thus how would they be irrelevant? Just trying to help...not be argumentative.
This was via a search for "junction" in http://www.gpsoft.com.au/manual9/NetHelp/default.htm

Addendum:Update: Found this page that may have some useful info:http://schinagl.priv.at/nt/hardlinkshel ... llext.html

Seems that he's also doing some work in this area...

Posted: 22 Jun 2008 14:34
by admin
j_c_hallgren wrote:Addendum:Update: Found this page that may have some useful info:http://schinagl.priv.at/nt/hardlinkshel ... llext.html

Seems that he's also doing some work in this area...
Yes, good page. There's also a section that answers the question of showing a "target": look for "Enumeration of Hardlinks". It seems to be as I thought: A hardlink is just 2nd (3rd etc...) pointer to the file on disk.


BTW, a junction is something totally different and already supported by XY.

Posted: 22 Jun 2008 15:26
by j_c_hallgren
Did you notice the History section? As in the "Vers 3 - in progress"...
List the hardlinks for a file by parsing MFT$ under XP. This is a tough job, but I am investigating if it is possible. Since it is stored in the MFT$ it should be possible.
And the very recent vers that allows hardlinks to be listed in Vista...

And then the "Enumeration of hardlinks": http://schinagl.priv.at/nt/hardlinkshel ... numeration where it says:
Unfortunately this feature is currently only available with Vista since the systemcalls to enmuerate hardlinks are not availble with XP or W2K. Under XP reading and processing the uniq file ID of all filesnames on a disk would be neccessary to gather the same informations
Thus it appears some support under Vista is possible but not so elsewhere.

Posted: 22 Jun 2008 17:19
by serendipity
I found these two links that might be of interest:

http://www.flexhex.com/docs/articles/hard-links.phtml

http://msdn.microsoft.com/en-us/library ... fs5_topic6

Update:
Don's coding was faster than my post here. :lol:

Posted: 22 Jun 2008 17:23
by admin
Yep, I know them both. Very good info.

Just uploaded the new BETA that now supports hard link creation! 8)

Re:

Posted: 17 Dec 2010 14:11
by xman
admin wrote:
Yep, I know them both. Very good info.

Just uploaded the new BETA that now supports hard link creation! 8)
Hi, what about a possibility to create Junctions and Symbolic Links? Hard links can only support files and only on the same drive. So it would make sense to create junction, if folder is pasted and symbolic link, if file is pasted and it's on another drive and the system is Windows Vista or newer. Creating the former takes three API calls (CreateFile, filling a structure, DeviceIoControl, CloseHandle) and the latter is just a simple API call to CreateSymbolicLink. Or maybe even better, let the user choose which one to use - each one of those three has its advantages and disadvantages. I've researched this stuff for one of my projects, so feel free to ask for more info, if you are interested in implementing this.

Symbolic links info:
http://msdn.microsoft.com/en-us/library/aa365680.aspx
http://msdn.microsoft.com/en-us/library/aa363866.aspx

Re: Re:

Posted: 17 Dec 2010 14:46
by admin
xman wrote:
admin wrote:
Yep, I know them both. Very good info.

Just uploaded the new BETA that now supports hard link creation! 8)
Hi, what about a possibility to create Junctions and Symbolic Links? Hard links can only support files and only on the same drive. So it would make sense to create junction, if folder is pasted and symbolic link, if file is pasted and it's on another drive and the system is Windows Vista or newer. Creating the former takes three API calls (CreateFile, filling a structure, DeviceIoControl, CloseHandle) and the latter is just a simple API call to CreateSymbolicLink. Or maybe even better, let the user choose which one to use - each one of those three has its advantages and disadvantages. I've researched this stuff for one of my projects, so feel free to ask for more info, if you are interested in implementing this.

Symbolic links info:
http://msdn.microsoft.com/en-us/library/aa365680.aspx
http://msdn.microsoft.com/en-us/library/aa363866.aspx
Basically yes, interested. Bump me later... next summer... :)