469,356 Members | 1,884 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

How to change drive in windows Perl

parajaganesh
I need to change my current drive from C: to X:. How to achieve this using perl...
Oct 11 '07 #1
6 13627
numberwhun
3,503 Expert Mod 2GB
I need to change my current drive from C: to X:. How to achieve this using perl...
Well, in DOS, you would use the cd command (change directory), right?

Perl has the chdir function for just this occasion.

Regards,

Jeff
Oct 11 '07 #2
Well, in DOS, you would use the cd command (change directory), right?

Perl has the chdir function for just this occasion.

Regards,

Jeff
I have already tried, it is not working in my system...

I have already tried an another method 'cd /d x:', it is also not working...
Oct 12 '07 #3
KevinADC
4,059 Expert 2GB
try this and see what gets printed:

chdir('x:/') or die "Can't change directory to x: $!";

saying "it does not work" is useless information, you have to post any error messages you are getting and the code you are using.
Oct 12 '07 #4
firoj
1
try this and see what gets printed:

chdir('x:/') or die "Can't change directory to x: $!";

saying "it does not work" is useless information, you have to post any error messages you are getting and the code you are using.

Thanks Kevin

Its working for me
Dec 4 '07 #5
KevinADC
4,059 Expert 2GB
Thanks Kevin

Its working for me
?? ?? ??
Dec 4 '07 #6
numberwhun
3,503 Expert Mod 2GB
Thanks Kevin

Its working for me

Unless you changed user names, we weren't aware that you had an issue that this resolved.

To the original poster of this thread, did you get this to work using Kevin's suggestion?

Regards,

Jeff
Dec 4 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Goutam Paruchuri | last post: by
2 posts views Thread by rqcoder | last post: by
2 posts views Thread by Talal Itani | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.