| | |
How to map network drive
Thread Solved |
•
•
Join Date: Mar 2009
Posts: 9
Reputation:
Solved Threads: 0
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
#/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
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:
I dunno if there is a cleaner way to say "hey, don't escape this stuff", but this should work.
perl Syntax (Toggle Plain Text)
$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.
![]() |
Similar Threads
- network drive mapping (Networking Hardware Configuration)
- Network Drive Mapping (IT Professionals' Lounge)
- Map network drive at logoff (Windows NT / 2000 / XP)
- Problems with mapping network drive (Networking Hardware Configuration)
- How to boot a Windowsmachine over Network using TFTP? (Windows NT / 2000 / XP)
- Mapping a network drive (Windows NT / 2000 / XP)
- Help on dedicated network drive please. (Networking Hardware Configuration)
- Windows 98se not able to map to network drive after demoting server (Windows 95 / 98 / Me)
- Add a Map Drive Button to the Toolbar (Windows tips 'n' tweaks)
- Home Network - 2 pc's internet and file sharing...? (Windows NT / 2000 / XP)
Other Threads in the Perl Forum
- Previous Thread: Unable to create no-cache meta tag with CGI
- Next Thread: Regex match to a scalar?
| Thread Tools | Search this Thread |






