os.link & NTFS 5

DP pennedinil at excite.com
Sat Dec 28 08:17:47 EST 2002


Thank you, to everyone who responded. 

Too bad about not having this functionality, to create hard links,
from Python. I was hoping...

My experience thus far - links can only be created in Win2k & WinXP,
i.e., NTFS 5. I guess an executable would have to check the file
system version. But I'm getting ahead of myself. I really don't know
much about C programming etc. and what calls are necessary.

In my judgement, after reading opinions, etc. I think the easiest,
though far from elegant, approach is to use an external executable.
With Cygwin, this would be ln.exe. Without Cygwin, the best option
thus far seems to be ln.exe from LSTOOLS <http://www.losoft.de/>. This
also seems to be one of the original link apps for creating hard
links. Links for directories (is this referred to as a junction in an
earlier email?) can only be symbolic links on NTFS5. I find these
quite useful for navigating the directory tree. For e.g., I have a
link in my "Documents & Setting" directory to get me to my Cygwin home
directory quickly. These can be created easily throught the Explorer
GUI, but not through any command line tools Microsoft provides (could
someone let me know if I'm wrong?)

But I was originally looking to create hard links to files. Symbolic
links to files does not seem to work under Win*. Cygwin creates a
special file for symbolic directory, one Win* apps unfortunately does
not recognize as a link.

I was also hoping to be able to manipulate ACLs of files, directories
(or even permissions like Read-only) from Python. I have also been
looking for utilities for reading/writing into file streams, i.e., the
Properties/Summary tab visible when right-clicking a file in
WinNT/XP/2k. I need this to catalog files on the system, specifically
PDF, MS Office & other data files. I've had even less luck here. I
can't even find a decent executable for this. My rant on Microsoft: if
you're going to provide a "feature", provide the tools too. And I mean
non-GUI tools.

I guess I'll have to either do more research or try and develop
something on my own. But given my lack of experience with, well, with
a lot of things, this is unlikely to happen any time soon.

Thanks again.

Dinil


yaipa at aol.com (yaipa) wrote in message news:<8d148763.0212272122.695ff21c at posting.google.com>...
> Sorry, not use to 'browsing' on a 15" monitor. ;^)
> 
<SNIP>



More information about the Python-list mailing list