Windows – How to List Files in a Directory That Are Hardlinks

cmd.exehardlinkwindows

I'm trying to work with backups and new versions of backups and I want to check if files listed in a directory are already hardlink alias to some file or if they are the last link to that content.

The objective is to go to a directory, then ask which files are the only hard link and which files are not the only hard link without having to ask every single one individually.

To ask each one individually, I could use

fsutil hardlink list

But I would have to do that 1 by 1.

Any ideas on how to do that?

Best Answer

I made a cmd script that solves that issue.

Most help is in the comments
If you still need help, make a question issue in the gihub repo.

https://raw.githubusercontent.com/brunoais/cmd-dir-hardlinks/master/listHardLinks.bat