Hi Dennis, Yes, I am equating a unix soft link to a windows shortcut. Both act as links to a file or directory.
I have found that windows shortcuts do appear in linux dir listings with a .lnk extension, however the file is meaningless to linux. On the other hand, a linux soft link does not appear in a windows directory listing, not that I really want it to. As for os.link and os.symlink, these appear to be unix specific. It would be nice if os.symlink, when run on windows, would create a shortcut. Thanks, Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Lee Bieber Sent: Friday, January 13, 2006 12:26 AM To: python-list@python.org Subject: Re: Creating shortcuts? On Thu, 12 Jan 2006 22:53:42 -0800, "Ron Griswold" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > Is it possible to create a shortcut to a file in Python? I need to do > this in both win32 and OSX. I've already got it covered in Linux by > system(ln...). > Are you equating a Windows "shortcut" to a Unix "link"? Soft link, at that, I suspect -- as a hard link can be done using os.link(), though a soft link can be done with os.symlink(). Lets see if my terminology is correct: a "hard link" is an additional directory entry pointing to a pre-existing file (with a count of how many entries exist for the file); a "soft link" is basically a special file that contains the full path to the actual file (and hence, could cross file system boundaries). I don't think Windows "shortcuts" are the same thing (as my memory struggles, I have vague inklings that NTFS actually supports Unix-like links, but practically nothing uses them). At best, they may be similar to a soft link, being a particular type of file, being that they are files with a ".lnk" extension (and hidden by the OS normally) -- > ============================================================== < > [EMAIL PROTECTED] | Wulfraed Dennis Lee Bieber KD6MOG < > [EMAIL PROTECTED] | Bestiaria Support Staff < > ============================================================== < > Home Page: <http://www.dm.net/~wulfraed/> < > Overflow Page: <http://wlfraed.home.netcom.com/> < -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list