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:


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

The old thread:
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