chandershivdasani
Programmer
I have a file say at the following location on an ftp server
"/edgar/full-index/1993/QTR2".
I am downloading the file and storing it on my local machine. I want it to store it with the same folder hierarchy. For example, suppose my current folder is C: so after my code runs, the file should be at the following location,
"C://edgar/full-index/1993/QTR2".
The following is the code that i have written, but it is giving the following error:
Cannot open Local file C:/edgar/full-index/1993/QTR1: No such file or directory
at get-master.pl line 42
use Net::FTP;
use strict;
my $start_year = 1993;
my $start_qtr = 1;
$ftp = Net::FTP->new(HOST) or die;
$ftp->login('anonymous')
$ftp->cwd("/edgar/full-index/$start_year/QTR$start_qtr") or die "$@";
$ftp->get('master.idx',"C:/edgar/full-index/$start_year/QTR$start_qtr") or die
"/edgar/full-index/1993/QTR2".
I am downloading the file and storing it on my local machine. I want it to store it with the same folder hierarchy. For example, suppose my current folder is C: so after my code runs, the file should be at the following location,
"C://edgar/full-index/1993/QTR2".
The following is the code that i have written, but it is giving the following error:
Cannot open Local file C:/edgar/full-index/1993/QTR1: No such file or directory
at get-master.pl line 42
use Net::FTP;
use strict;
my $start_year = 1993;
my $start_qtr = 1;
$ftp = Net::FTP->new(HOST) or die;
$ftp->login('anonymous')
$ftp->cwd("/edgar/full-index/$start_year/QTR$start_qtr") or die "$@";
$ftp->get('master.idx',"C:/edgar/full-index/$start_year/QTR$start_qtr") or die