Accessing files in a directory which is a shortcut link (Windows)

Tim Golden mail at timgolden.me.uk
Sat May 2 12:46:56 EDT 2009


Tim Golden wrote:
> Windows shortcuts are Shell (ie GUI Desktop) objects rather
> than filesystem objects. The filesystem doesn't treat them
> specially; just returns the .lnk file (or whatever it's
> called). 

As a caveat: they don't actually *have* to be called .lnk
(altho' they almost universally are). That said, I don't know
any straightforward way of otherwise distinguishing shortcut
from non-shortcut files. I think you'd just have to call
.Load on the IPersist instance and catch the E_FAIL
exception.

TJG



More information about the Python-list mailing list