mytutorial has asked for the wisdom of the Perl Monks concerning the following question:
I need to retrieve files from a directory on a remote server that are at least 5 minutes old. I am using Net::SFTP::Foreign in my Perl script. The array @directory_info contains the directory path and the filemask. I am pulling the files from the remote server using $sftp->glob. How can I only get the files that are at least 5 minutes old using $sftp->glob? The $sftp->glob portion from my script is below.
while($i < 11) { $directory = "$directory_info[$i][0]"; $filemask = "$directory_info[$i][1]"; $sftp->setcwd($directory) or $newerr=1; @list = $sftp->glob("$filemask") or $newerr=1; } $i++;
Thank you for your time and help!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to retrieve files at least 5 minutes old using sftp foreign
by atcroft (Abbot) on Nov 06, 2013 at 18:12 UTC | |
Re: How to retrieve files at least 5 minutes old using sftp foreign
by jellisii2 (Hermit) on Nov 06, 2013 at 18:31 UTC | |
Re: How to retrieve files at least 5 minutes old using sftp foreign
by salva (Canon) on Nov 07, 2013 at 08:15 UTC |
Back to
Seekers of Perl Wisdom