dkaplowitz has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/perl -w use strict; open OUTPUT, ">c:/temp/warning.txt"; my $mytime=(time); my ($File,$FileStat,$CallOutDir); opendir(ROOT, ".") or die "Arghh!!! $!"; 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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Multiple Folder Search Question
by matija (Priest) on Mar 22, 2004 at 15:40 UTC | |
by dkaplowitz (Novice) on Mar 22, 2004 at 18:30 UTC | |
by graff (Chancellor) on Mar 23, 2004 at 03:52 UTC | |
by dkaplowitz (Novice) on Mar 22, 2004 at 20:30 UTC | |
by matija (Priest) on Mar 22, 2004 at 21:16 UTC | |
by dkaplowitz (Novice) on Mar 22, 2004 at 21:25 UTC | |
|
Re: Simple Multiple Folder Search Question
by Happy-the-monk (Canon) on Mar 22, 2004 at 15:04 UTC | |
by dkaplowitz (Novice) on Mar 22, 2004 at 15:26 UTC | |
by Happy-the-monk (Canon) on Mar 22, 2004 at 15:32 UTC |