in reply to Re: Re: Re: Re: Re: ignore certain files in a folder search, and create a random .txt file
in thread ignore certain files in a folder search, and create a random .txt file

I didn't see your reply until today. I'm currently using the following, which is working:
use strict; open OUTPUT, ">c:/temp/warning.txt"; my $mytime=(time); my ($File,$FileStat,$CallOutDir); chdir 'F:\Solimar_Work_Directories\XVTP\XVTP Cluster Feed' or die "Arg +hh!!! $!"; 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_$/); next if (-d $File); 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;
  • Comment on Re: Re: Re: Re: Re: Re: ignore certain files in a folder search, and create a random .txt file
  • Download Code