need to know how to map a drive using perl.

Hello,

Does anyone out there know how to map a win32 drive through a perl script?
I can't seem to find anything out there on this, could use some advise.
Even if, (though I regret) you know how to map a drive on win32 system using DOS, then I could at least run a system command using perl.

Any help on this would be greatly appreciated.

Regards,
JoeMc

Comments

  • Hi,

    At the command line you can use the "net use" command. I think it's something like:

    net use z: \serverpath

    There may be a CPAN module too; look on http://search.cpan.org/ for modules with Win32 in the name.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • : Hi,
    :
    : At the command line you can use the "net use" command. I think it's
    : something like:
    :
    : net use z: \serverpath
    :
    : There may be a CPAN module too; look on http://search.cpan.org/ for
    : modules with Win32 in the name.
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

    Hey Jonathan, You think Win32-FileOp-0.14.1 would help to map a network drive on my win32 platform on the fly to a samba share on my linux box?
    This a little new for me mixing win32 with linux. Also, I'm using an ActiveState version of perl, would this CPAN module work with it?

    By the way, how was your presentation?

    Regards,
    JoeMc

  • : Hey Jonathan, You think Win32-FileOp-0.14.1 would help to map a
    : network drive on my win32 platform on the fly to a samba share on my
    : linux box?
    Looking at the docs, it would appear so, yeah. I think that the share is actually provided by Samba should matter little - it'll all go through the same networking layer that mapping the drive by the GUI does anyway.

    : This a little new for me mixing win32 with linux. Also, I'm using
    : an ActiveState version of perl, would this CPAN module work with it?
    It may well even ship with it.

    : By the way, how was your presentation?
    OSCON is next week, and the presentation is still not finished yet! Arrgh!

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
  • : : Hey Jonathan, You think Win32-FileOp-0.14.1 would help to map a
    : : network drive on my win32 platform on the fly to a samba share on my
    : : linux box?
    : Looking at the docs, it would appear so, yeah. I think that the
    : share is actually provided by Samba should matter little - it'll all
    : go through the same networking layer that mapping the drive by the
    : GUI does anyway.
    :
    : : This a little new for me mixing win32 with linux. Also, I'm using
    : : an ActiveState version of perl, would this CPAN module work with it?
    : It may well even ship with it.
    :
    : : By the way, how was your presentation?
    : OSCON is next week, and the presentation is still not finished yet!
    : Arrgh!
    :
    : Jonathan
    :
    : ###
    : for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    : (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    : /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

    Well, good luck next week (not that you'll need it).
    On another note:
    Out here in Columbus, Ohio (USA) it seems there are less and less Perl jobs being advertised for, is that the same on your side of the pound?
    I'm hoping Perl 6 will re-energize the need for Perl programmers every where. :-)

    Thanks for the advise, I'll check to see if it came with the activestate installation of perl I have, and let you know incase someone else asks.

    Thanks much,
    JoeMc

    Me again... I can't seem to find a contact at activestate to find out if
    Win32-FileOp-0.14.1 come standard with their perl distribution. will printing the @INC tell me?

    Thanks again for any help.
    JoeMc


    Yep, Me again...
    I found this url that will tell you what modules come with activestate perl:
    http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/Windows/ActivePerl-Winfaq9.html#What_modules_come_with_the_Perl_

    Looks like it doesn't come with ActiveState Perl yet, so I may be reduced
    to system commands using DOS, yuk! Oh well, gotta do what you gotta do I
    guess.

    Have a good day! Looks like I'm off to brush up on DOS... :-(

    Regards,
    JoeMc
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion