this is what I use for paths in perl for win32

c:\\folder\\folder\\filename.txt

I backtick the "\" with another "\"

Also, when you go to map a drive, I use the system function
and the "net use" command (I know there is probably a module
you can download in perl to do this.....)

Here is an example

system("net use x: \\\\pacer\\c   my_nt_password
/user:MYDOMAIN\\briang");

If you were to run this from DOS you wouldn't
have to backtick everything like I did.
This system call maps your x: drive to the share \\pacer\c  (the c drive
share on the server pacer).

Hope this helps, you can also run "net use /?"  to see the options for net
use





----- Original Message -----
From: "Flynn, Timothy J" <[EMAIL PROTECTED]>
To: "Perl-Win32-Users@listserv. ActiveState. com (E-mail)"
<[EMAIL PROTECTED]>
Sent: Tuesday, April 03, 2001 11:00 AM
Subject: A couple questions with windows and perl


> Hi,
>
> First Question:  I have a program that relies on this type of UNIX
> compatible path convention, i.e..  /somedir/someplace/somefile, instead of
> 'C:\somedir\someplace\somefile'.  This seems to work okay when I only have
> one drive, say drive c, but what changes say when I have a drive S: that I
> want to use as /?  I have tried chdir('s:\') but that doesn't seem to
> totally do it.  Is there a way to set / to whatever drive root you want it
> to be and then have the script work normally from then on?
>
> Second Question:  When you run a perlscript on a windows system but
> no one is logged in, say with the scheduler, do you have to create drive
> mappings in the script or does windows use the drive mappings for the
> account the script is running under?  If I need to create the mapping can
> you please provide a brief example of how this is accomplished?
>
> My config is windows 2000 server +
> ActivePerl-5.6.0.623-MSWin32-x86-multi-thread.msi.
>
> TIA!
> -Tim
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
>

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to