http://www.perlmonks.org?node_id=963656

terrytedzi has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks: I am writing a perl script that download files from a directory C:/Users/Win7/Desktop/intenship doc2 in the local machine added to an ftp server, to another directory C:/users/Desk/personal in the same local machine not added to the ftp server. When I run the script the server outputs an error: (000019)4/4/2012 12:20:20 PM - terence (127.0.0.1)> 550 CWD failed. "/C:/Users/Win7/Desktop/intenship doc2": directory not found. I checked the directory investigating if i have mixed up the cases of the letters but everything was O.K, Can the monks help m? here is the code

#!/usr/local/bin/perl use DBI; use Net::FTP; use File::Basename; #connection paraneters to localhost $IP='127.0.0.1'; $users='Terence'; $password='christine'; $directory="C:/Users/Win7/Desktop/intenship doc2/"; #Connection to netboss $ftp = Net::FTP->new($IP, Debug => 0, Passive => 0) or die "cannot + connect"; $ftp->login($users,$password); $ftp->cwd($directory); #list files @fichier=$ftp->ls($directory); foreach (@fichier) { $file = basename($_); if($file = "00wa-mb") { $ftp->get($file,"C:/users/Desk/personal".$file); } $ftp->quit;