develooper Front page | perl.perl5.porters | Postings from May 2003

Re: windows, shortcuts and 'use lib'

Thread Previous | Thread Next
Tim Fries
May 12, 2003 07:36
Re: windows, shortcuts and 'use lib'
Message ID:
> wow.. I almost missed this post... really helpful.. I have a couple of
> questions though.
>     1) is there a CreateSoftLinkW and CreateSoftLinkA..

No, unfortunately. I've often wished for these myself. Windows doesn't
have a transparent implementation for *symbolic* links (shortcuts are
the closest it gets there; but as you've already noted, they have
implementation issues).

>     2) where can I find the documentation on the usage of these
>        commands?

MSDN has documentation on the API call used:

>     3) does this support file as well as directory links?

File links only. The API call fails if you specify a directory as the
file to link to. :(

> Anyways, I downloaded hard link magic, and it looks like its only a gui
> wrapper. And is there a command line tool to do this?

I don't know if there's an official tool from Microsoft that
encapsulates the functionality; but there are numerous
third-party utilities written that can do it, some
command-line, some GUI.

This site has a Perl script (using Win32::API::Prototype) for a
command-line tool using CreateHardLink (search down for Example 3.3):

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About