Hi Guys I am having problems with the simplest of things at the moment…

I am trying to map a drive to a remote share and I used the following code, which works fines, but how can capture the drive letter that the OS assigned, i.e the "I" letter as in the example below?
system 'net.exe use * \\\\server_1212\\d$'; Drive I: is now connected to \\ server_1212\d$. The command completed successfully.
And, instead of using net use command, is there something that is Perl native and faster that this command?... I have tried Lanman and NetResource, but they didn't work, when they did work (i.e. no error messages) I did not get a drive letter or an icon representation of the drive in "My Computer". I can't use File::Op because this requires downloading the library, and for which I don't have ftp access and even if I did have ftp access, ppm doesn't work for some reason (no matter how many times I have installed Perl and checked the path) every time I type ppm it chucks an error and with that my beloved message "Perl is not in your path"!?!? So I have to use something that is built into the Perl installation.

Many Thanks guys.

In reply to mapping a network drive by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.