roteme has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I'm looking for perl command to Create/Remove windows link - like 'MKLINK' windows command.

Thanks

  • Comment on Perl command to Create/Remove windows link

Replies are listed 'Best First'.
Re: Perl command to Create/Remove windows link
by BrowserUk (Patriarch) on Aug 01, 2012 at 05:06 UTC

    How about:

    system qq[mklink /H foo \\windows\\system32\\notepad.exe];

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      I have created directory symbolic link by 'mklink' windows command.

      I didn't success to found this directory symbolic link using '-l' flag - maybe do you have any idea

      <DIR> . <DIR> .. <DIR> Dir1 <DIR> Dir2 <DIR> Dir3 <SYMLINKD> temp [Dir1]

      According to the above example. i would like to print only 'temp' directory with the following code:

      my @dirs = <*>; foreach my $symlnk (@dirs ) { print "$symlnk\n" if (-l $symlnk); }

      But as i wrote 'temp' folder wasn't printed - way?

      Thanks

        No.

        You might be able to write one, if: a) you can write C; b) and learn XS; c) and learn the windows API.

        But it'd be a huge amount of work to do something that is already possible via an OS supplied utility.

        Why would you want to do that?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?