Page 1 of 2

hard links - info about other hard links to same files?

Posted: 2019 Aug 02, 05:13
by jimspoon
Can xplorer2 be made to display the other hard link pathnames for files shown in a pane? In a details pane, or in a scrap container? I know I can use the Links column to display files with >1 link in a scrap container, but is it possible to sort them so that all the hard links for each file are displayed together, i.e. consecutively? When browsing files in a pane, it would be great to be alerted to the fact that a file has other hard links to it, to be able to jump to them and manage them easily.

Re: hard links - info about other hard links to same files?

Posted: 2019 Aug 02, 19:25
by nikos
I have a todo note to create a feature like this one day. In the meantime you can use this external tool

Code: Select all

fsutil hardlink list MyFileName.txt
https://docs.microsoft.com/en-us/window ... l-hardlink

Re: hard links - info about other hard links to same files?

Posted: 2019 Aug 12, 09:18
by RightPaddock
jimspoon wrote: 2019 Aug 02, 05:13 Can xplorer2 be made to display the other hard link pathnames for files ....
Have a look at Link Shell Extension, it can give you this:-

Image <<== click me

BR

Re: hard links - info about other hard links to same files?

Posted: 2019 Aug 23, 14:01
by johngalt
Another vote for Link Shell Extension - not only does it add extra info to the link properties, it makes actually creating links / junctions etc. much easier from directly in Explorer - and works extremely well when used from inside Xplorer² as well.

Re: hard links - info about other hard links to same files?

Posted: 2019 Aug 26, 20:40
by FrizzleFry
I also use and like Link Shell Extension but I found a nice AutoIt script that displays a window with all the hard links of a file quicker than doing properties and link properties.

Code: Select all

#include <Array.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>

;local $file = 'D:\scripts\AutoIt\Planet Suzy~link~.au3'
if $cmdline[0] > 0 then
	$file = $cmdline[1]
endif

; Enumerate all hard links to the file
Local $info = _WinAPI_EnumHardLinks($file)
_ArrayDisplay($info, '_WinAPI_EnumHardLinks',"",default,default,"Hard Links")
Just save it to a convenient place and call it from a user command

>C:\tools\AutoIt3\AutoIt3_x64.exe C:\scripts\list-hard-links.au3 "$F"

You need to install AutoIt for the script to work.

Re: hard links - info about other hard links to same files?

Posted: 2019 Aug 27, 02:30
by johngalt
There's also a great little utility by Nir Sofer that accomplishes the same - http://www.nirsoft.net/utils/ntfs_links_view.html

Re: hard links - info about other hard links to same files?

Posted: 2019 Nov 09, 22:16
by BRX
Oh, that's nice. That has been a longstanding request of mine and I actually came to the forum just now to ask about it again.

I've also used the link shellextension so far and made a very simple little autohotkey script which displays the hardlinks copies them
to the clipboard and pastes them into an x2 scrap window.

But it would be very nice if x2 would do this natively with some command "send hardlinks to scrap" and/or displaying the links by clicking on
the number in the link column.

Re: hard links - info about other hard links to same files?

Posted: 2019 Nov 21, 21:37
by FrizzleFry
I agree. Sending all the hard links of a file to a scrap pane would be useful.

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 06, 11:42
by BRX
May I revisit my suggestion to support sending (all) hardlinks of a file to a scrap pane?

I think it would be a really nice addition and certainly help my workflow being able to view and manipulate the hardlinked files directly from the scrap pane with all x2 functions.

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 07, 05:43
by nikos
I have this in my list for one day... if you are in a hurry here's the essential source code
https://devblogs.microsoft.com/oldnewth ... 0/?p=10103

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 07, 12:56
by BRX
Since it's been 9 years I asked the last time for it I won't pretend I'm in a hurry :D (and wouldn't know what to do with the source code anyway).

I have a workaround for it in the meantime. But it'll be nice to have it natively in x2 when you get to it. (And I probably will ask earlier than 9 years for it, I guess).

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 07, 13:06
by nikos
:D
i'm not in a hurry to add this feature because it's extremely geeky and what's the point anyway?

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 07, 14:24
by BRX
OK, I consider all of my requests having a point, otherwise I wouldn't bother you with it. :wink:

Here's this one: In almost 30 years of internet I've amassed a vast collection of files. With big harddisks and programs like Everything you don't have to organize them like in medivial (Internet) times so I put the data on big harddisks (just one for audio, one for apps etc.) and upgrade to a bigger one when they get filled.

Still to save space I'm using dupemerge and jdupes to identify doubles and hardlink them. Those are command line programs and work rather fast unlike some other duplicate cleaners. But to locate the dupes and move/delete/rename or whatever is tedious.

That's where this feature would come in handy.

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 07, 23:53
by johngalt
Wait, you don't use X² to find duplicates? :shock:

Re: hard links - info about other hard links to same files?

Posted: 2021 Jun 08, 05:56
by nikos
right now I'm working on a new program that will... find duplicates, and NEAR duplicates, and can also replace them with links. More on that later!

ps. I was just bitten by hard links, I am migrating to a new laptop and obviously all the original hard links were replaced with real files... damn this program :)