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.

2
  • 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 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, 2014 at 15:26
  • thanx a lot, I think the information in the page you introduced solves my problem. Oct 26, 2014 at 4:20

1 Answer 1

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
4
  • 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 Oct 26, 2014 at 4:21
  • sorry @user4002852. You need SysInternals to run the first command. You can get it from here 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. Oct 26, 2014 at 13:07
  • Thank you Dhiwakar Ravikumar, I appreciate your great help! Oct 27, 2014 at 9:07
  • Please mark the answer as correct if (The Tick Mark) if you feel this answer helped you or solved your problem. Thanks Oct 27, 2014 at 9:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .