LPM: Changing drives in Windows?
llang at baywestpaper.com
llang at baywestpaper.com
Wed Dec 15 15:05:47 CST 1999
I tend to stick with absolute file references for just about everything.
Use one or more variables to store the path and you only have to change
it/them in one place if the file in question ever needs to relocate. This
doesn't answer your original question, but it does circumvent it.
Loren Lang Phone: 606-734-0538 x326
Network Administrator Fax: 606-734-8210
Bay West Paper Corporation email: llang at baywestpaper.com
"There is no greater burden than great potential." - Charles Schultz
David Hempy
<hempy at ket.org> To: lexington-pm-list at happyfunball.pm.org
Sent by: cc:
owner-lexington-pm-l Subject: LPM: Changing drives in Windows?
ist at pm.org
12/15/99 03:10 PM
Please respond to
lexington-pm-list
Okay, surely this is a no-brainer, but I'm stumped. Let's say I run a perl
program while in C:\. It needs to access some files on different drives.
I tried:
chdir "D:\db";
This did not change the program's cd to D:. I assume it acts like cd from
the command line, which changes D:'s cd, but leaves you on C: . (or where
ever you are.)
No mention of it did I find in _Learning Perl on Win32 Systems_ nor on
Active State's installed perl docs. `PPM search Win32` yielded nothing
useful. Experiments like:
`d:`;
proved fruitless. I suspect if this line did work, it was only during the
shell and reverted back when the program resumed.
I guess I could give absolute references to all my file accesses, but
that's a drag.
Any suggestions?
-dave
--
David Hempy
Internet Database Administrator
Kentucky Educational Television
More information about the Lexington-pm
mailing list