I need to print files by order of the timestamp in a directory on a remote Windows server. I have the code to print files by order of the file names. But I do not know how to change it to print files by order of the timestamp. I am using Net::SFTP::Foreign module. The current code is as below. The "ordered => 1" option is to print by file name. What is the option to print by the timestamp? I really appreciate if anyone can help.
CODE $sftp->ls('Win_Directory', ordered => 1, wanted => sub { if ( $_1->{longname} =~ /^d/ ) { $dircount++; } else { print "$_1->{longname} \n"; } } ) /CODEIn reply to How to print files by order of the timestamp? by perlesrh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |