am currently writting a script that downloads a file. But for some reason am unable to download the file to a location that i set, am not sure of the syntax and haven't been able to work it out from perldoc.
$ftp->get($required_timetable_increment,$required_timetable_increment,"D:/archive");
Above is the bit of code that i am trying to use to get get the file.
$required_timetable_increment, contains the name of the file that i need e.g. RJJT123.ZIP
any help on the matter would be appreciated.
You might take a look at this thread about net::ftp & uploading files [webmasterworld.com]...as far as I can remember, the 2nd post there is a fully working script.
Perhaps you could bastardize some of that code...?
but to put a file in a specific folder you have to change to that folder i.e.
chdir($timetabledir); <--
$ftp->binary();
foreach my $file (@dir)
{
$ftp->get($file);
print "Downloaded file $file\n";
}
where $timetabledir = "D:/mydirectory/ZipsNew";
:)