943,844 Members | Top Members by Rank

Ad:
  • Perl Discussion Thread
  • Marked Solved
  • Views: 4361
  • Perl RSS
Mar 31st, 2009
0

How to map network drive

Expand Post »
Hi I want to map a network drive on Windows platform and i am running my script on Unix machine;
What are the possibilities by which i can map network drive in perl

Please reply

thanks in Advance,
aNa
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rana03 is offline Offline
9 posts
since Mar 2009
Mar 31st, 2009
0

Re: How to map network drive

Wait What?

You're running a script on *nix, and want that script to map a drive on a windows machine?????
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Apr 1st, 2009
0

Re: How to map network drive

no i am using script on windows platform only but executing it using cygwin; find below code
#/usr/bin/perl

$map_drive = '/cygdrive/c/windows/system32/net use x: \\share1\share2';
print "\n$map_drive\n ";

system ("$map_drive");

i get below error
/cygdrive/c/windows/system32/net use x: \share1\share2
System error 67 has occurred.

The network name cannot be found.


Please reply
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rana03 is offline Offline
9 posts
since Mar 2009
Apr 1st, 2009
0

Re: How to map network drive

ah, you are missing a slash of some kind it seems... you are escaping the first backslash with the second. You probably need to add something like this:
perl Syntax (Toggle Plain Text)
  1. $map_drive = '/cygdrive/c/windows/system32/net use x: \\\\share1\\share2';

I dunno if there is a cleaner way to say "hey, don't escape this stuff", but this should work.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Apr 8th, 2009
0

Re: How to map network drive

thanks for the reply let me try and get back to you
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rana03 is offline Offline
9 posts
since Mar 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Perl Forum Timeline: Unable to create no-cache meta tag with CGI
Next Thread in Perl Forum Timeline: Regex match to a scalar?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC