use strict; open OUTPUT, ">c:/temp/warning.txt"; my @directories = ('F:\Solimar_Work_Directories\XVTP\XVTP Cluster Feed +', 'G:\Solimar_Work_Directories\XVTP\XVTP Cluster Feed', 'G:\XVTPInpu +t', 'G:\XVTPInput\DBQA_input', 'G:\XVTPInput\DB_Input'); my $mytime=(time); my ($File,$FileStat,$CallOutDir); foreach my $dir (@directories) opendir(ROOT,$dir) or die "Directory <$dir> failed: $!"; foreach my $F (readdir(ROOT)) { $File="$dir/$F"; foreach $File (readdir(ROOT)) { next if $File=~/^\./; next if ($File eq "_Watched_Folder_._Active_"); next if ($File=~/\._Checking_File_Readiness_$/); if ($FileStat = (stat $File)[9]){ if ($FileStat <= ($mytime - 300)) { print "File older than 5min found. The file name is $File"; print OUTPUT "File older than 5min found. The file name is $Fi +le"; last; } } } } close OUTPUT;
$ perl -c watchdir_revc.pl syntax error at watchdir_revc.pl line 18, opendir" watchdir_revc.pl had compilation errors.
In reply to Re: Re: Simple Multiple Folder Search Question
by dkaplowitz
in thread Simple Multiple Folder Search Question
by dkaplowitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |