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

Re: windows, shortcuts and 'use lib'

Thread Previous | Thread Next
From:
Tim Fries
Date:
May 12, 2003 07:36
Subject:
Re: windows, shortcuts and 'use lib'
Message ID:
381201089615.20030512103510@dicecorp.com
> 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:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createhardlink.asp

>     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):

http://www.codeproject.com/books/1578702151.asp


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About