Cheers - L~R#!/usr/bin/perl use strict; use warnings; my $dir = $ARGV[1] || 'C:/devl/bin'; chdir $dir or die "Unable to change directories to $dir : $!"; my $now = time; my $threshold = $ARGV[0] || 300; opendir( DIR , '.' ) or die "Unable to read $dir : $!\n"; for ( readdir( DIR ) ) { if ( abs( $now - (stat($_))[9] ) > $threshold ) { Create_Warning_File(); last; # Unless you want 1 warning per file } } sub Create_Warning_File { # You did not give enough information to fill this in }
In reply to Re: script for scanning folder and sending a warning if a file within it is older than 5 minutes
by Limbic~Region
in thread script for scanning folder and sending a warning if a file within it is older than 5 minutes
by dkaplowitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |