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
thanks in Advance,
You're running a script on *nix, and want that script to map a drive on a windows machine?????
no i am using script on windows platform only but executing it using cygwin; find below code
$map_drive = '/cygdrive/c/windows/system32/net use x: \\share1\share2';
print "\n$map_drive\n ";
i get below error
/cygdrive/c/windows/system32/net use x: \share1\share2
System error 67 has occurred.
The network name cannot be found.
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:
$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.
thanks for the reply let me try and get back to you