Hard links on Windows NT 4 and Windows 2000

Ed Brey brey at myrealbox.com
Fri Jun 15 21:40:29 CEST 2001


There was a short thread about a year regarding hooking os.link up to
the hard links that exist for Windows NT.  This can be done for hard
linked files (but not directories) in any OS that supports NTFS (i.e.
Windows NT and 2000).  The convenience function CreateHardLink added
to Windows 2000 does not work under NT 4, of course; however,
CreateHardLink isn't needed to create a hard link.  See MS KB article
Q234727 for details on how to do it:

http://support.microsoft.com/support/kb/articles/Q234/7/27.ASP

It should be possible to hook up os.link and os.stat (which currently
always specifies a single link) to more closely reflect Windows
reality.

The old thread:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=ae5afcf5615fa94,2&seekm=rn7c5.2568%244p3.19620%40news-server.bigpond.net.au#p
didn't appear aware of the fact that hard links are not Windows
2000-specific, and so even though I'm not a Python developer, I
thought I'd drop off this pointer in case anyone is interested in
implementing the feature.



More information about the Python-list mailing list