Hi,
I am doing a module which will download files from ftp server, as I am running my perl script from C:\perl location, I want the ftp download to take place at another drive say D:\ftp, Can anyone tell me the perl command to change the drive location.
Any URL reference is also kindly appreciated.
Thanks
Uma
On Fri, 15 Oct 2004 [EMAIL PROTECTED] wrote :
>This maybe a hint.
>
>C:\>perl -MCwd -le "print cwd(); system('cd aa'); print cwd();"
>C:/
>C:/
>
>C:\>perl -MCwd -le "print cwd(); chdir('aa'); print cwd();"
>C:/
>C:/aa
>
>Regards,
>Hirosi Taguti
>[EMAIL PROTECTED]
>
>
>
>________________________________
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Uma Chandrsekaran
> Sent: Friday, October 15, 2004 9:29 PM
> To: [email protected]
> Subject: Need help on usage of "Net::FTP" in Windows 2000 Server
>
>
>
> Hello
>
> I need help in FTP a file to a local directory. But it is not working.
>
> $path_1 = "C:\uma";
> system (cd "$path_1");
> $path = "/home/uma";
> print "Download initiated ...\n";
>
> my $ftp = Net::FTP->new($hostname);
> $ftp->login($username, $password) or warn "Can't log test $username\n";
> $ftp->cwd($path) or warn "could not cwd $path";
> my @files = $ftp->ls;
>
> foreach my $file (@files) {
>
> print "Downloading >> $file\n";
> $ftp->get($file);
> print "$file \n";
> }
>
> In this program, the files are downloaded in the directory where perl script is executed. But I want the files to be in the $path_1 which is not happening though I changed the local path using "system" command.
>
> Your response on this would be highly appreciated.
>
> Thanks & Regards
> C.Uma
>
>
>
> <http://clients.rediff.com/signature/track_sig.asp>
>
>
_______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
