os.link & NTFS 5

yaipa h. yaipa at yahoo.com
Sat Dec 28 15:08:48 EST 2002


Dinil,

> My experience thus far - links can only be created in Win2k & WinXP,
> i.e., NTFS 5.

 Ans. If you want a standard interface use some form of Unix, pick one,
      else you will always have to deal with shifting uSoft APIs. :(

> In my judgement, after reading opinions, etc. I think the easiest,
> though far from elegant, approach is to use an external executable.

 Ans. Anything you can do in VB you can do in Python.  Don't be afraid
      of the Win32 APIs provided in the Win32 dist. of Python. In the long
      run they will serve you well and at some point there will be no 
      getting around using them. The Win32 API for Python may seem a 
      little hacky at first, but guess what that is how uSoft does
      it in VC++ and VB. Again if you don't like the way it feels, UNIX!!

      The way forward for you is to go out and buy O'Reilly's 'Python 
      Programming on Win32' and learn it cover to cover. Once you do
      that, then you will be able to accomplish what you wish.

Cheers,

Yaipa.h


pennedinil at excite.com (DP) wrote in message news:<6af8e801.0212280517.4d243599 at posting.google.com>...
> 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