0

Is it possible to identify if a folder is actually a hard link created by mklink?

I want to get folders and subsequent sub-folders. But hard linked folders drops me into a loop.

nixda
  • 26,823
  • 17
  • 108
  • 156
  • I'm not entirely sure if I understand your question because @Dhiwakar is right about "hard linked folders". But in case you only want to avoid loops, [this answer](http://superuser.com/a/528499/50173) could be helpful. Btw. it doesn't matter if a junction point is created via mlink or any third-party tool. They all use the same technique – nixda Oct 25 '14 at 15:26
  • thanx a lot, I think the information in the page you introduced solves my problem. – Mehrdad Ahankhah Oct 26 '14 at 04:20

1 Answers1

0

You can't create hardlinks for folders. There's no such thing. You can create junction points and symbolic links for folders.

These can be identified with the following command

junction -s pathname

You can find hard links for folders with the following command

fsutil hardlink list filename
nixda
  • 26,823
  • 17
  • 108
  • 156
Dhiwakar Ravikumar
  • 2,109
  • 5
  • 25
  • 39
  • Dhiwakar Ravikumar, than you very much, but: 1- I use MKLINK to make hardlinks. 2- I didn't find junction as a internal or external command in my OS (windows 8). again thank you, and request any one to help me to find junction Mehrdad Ahankhah www.irancad.com – Mehrdad Ahankhah Oct 26 '14 at 04:21
  • sorry @user4002852. You need SysInternals to run the first command. You can get it from here http://technet.microsoft.com/en-in/sysinternals/bb842062.aspx & you need fsutil. You can use any command/tool you like to create a hardlink,junction point,symlinks.It makes no difference. – Dhiwakar Ravikumar Oct 26 '14 at 13:07
  • Thank you Dhiwakar Ravikumar, I appreciate your great help! – Mehrdad Ahankhah Oct 27 '14 at 09:07
  • Please mark the answer as correct if (The Tick Mark) if you feel this answer helped you or solved your problem. Thanks – Dhiwakar Ravikumar Oct 27 '14 at 09:50