in reply to Re^3: Net::SFTP::Foreign getting files
in thread Net::SFTP::Foreign getting files
Ok now I am getting the file names and downloading them the way I was hoping for with one exception. In my script I want a file "IRP_20130410" the remote server has a file named "IRP_20130410000438.txt" The remote windows machine adds 6 characters for time and the ".txt" extension. I want to be able to match the file name I am looking for and don't care about the remaining characters. So can I just put a wild card in the glob?
($file) = $sftp->glob("${file}*", names_only => 1); defined $file or die "file not found"; $sftp->get($file, "$ai_dest_day/$file");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Net::SFTP::Foreign getting files
by salva (Canon) on Apr 11, 2013 at 15:14 UTC |