use warnings; use strict; use DateTime; use File::Find::Rule; my $time_zone = DateTime::TimeZone->new(name => 'local'); my $a_year_ago = DateTime->now(time_zone => $time_zone)->subtract(year +s => 1); File::Find::Rule->file ->name(qr/\A\d{7}_\d-\d{7}-\d{2}_\d{10}\.para\z/) ->mtime('<' . $a_year_ago->epoch) ->exec( sub { ### Your logic. } )->in(qw( /paths /to /search ));
In reply to Re: Script to find and delete files
by eff_i_g
in thread Script to find and delete files
by Delise1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |