Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-12-09 02:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?