Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: mapping a network drive

by fglock (Vicar)
on Jul 02, 2003 at 12:26 UTC ( #270781=note: print w/replies, xml ) Need Help??


in reply to mapping a network drive

You can assign a drive name yourself:

system 'net.exe use I: \\\\server_1212\\d$';

Or, use backticks to capture the command output.

@result = `net.exe use * \\\\server_1212\\d$`;

Replies are listed 'Best First'.
Re: Re: mapping a network drive
by arthas (Hermit) on Jul 02, 2003 at 13:14 UTC

    The latter is probably a better choice, as it won't fail if a network path is alreadi assigned to the letter I.

    Michele.

Re: Re: mapping a network drive
by blackadder (Hermit) on Jul 02, 2003 at 13:16 UTC
    Ahh, the back ticks instead of the system, oh brother.....damn. Thanks very much...god bless.
Re: Re: mapping a network drive
by blackadder (Hermit) on Jul 02, 2003 at 13:20 UTC
    this is the reason why I was using net use *,...i wanted any available drive, the I drive could be mapped to somewhere else on another machine….Anyway, I thought there might be more elegant way to grab the dive letter assigned rather than having to write a pattern matching code. Thanks for the tip.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://270781]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2022-12-03 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?