in reply to Re: Re: using $ftp->mdtm($file)
in thread using $ftp->mdtm($file)
Cheers - L~Rmy $stamp; # set to appropriate epoch time stamp my @files = $ftp->ls(); chomp( @files ); for my $file ( @files ) { print "Testing file : $file\n"; if ( $file !~ /\.stm$/ ) { print "Skipping : $file is not an .stm file\n"; next; } my $mtime = $ftp->mdtm($file); die "cannot get mdtm for $file\n" if ! $mtime; print "$file last modified : ", scalar localtime($mtime), "\n"; if ( $mtime < $stamp ) { print "Removing file : $file\n"; $ftp->delete($file); print $ftp->message, "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: using $ftp->mdtm($file)
by stewartski (Initiate) on Feb 25, 2004 at 16:02 UTC | |
by Limbic~Region (Chancellor) on Feb 25, 2004 at 16:14 UTC | |
by stewartski (Initiate) on Feb 26, 2004 at 12:04 UTC | |
by Limbic~Region (Chancellor) on Feb 26, 2004 at 13:51 UTC |