but now I get a warning based on the "." and "..", which I'd also like to ignore (I thought the first script I posted ignored that. Pardon me if I didn't append your code correctly...I'm obviously quite new to all this. Thanks for any input. Dave#!/bin/perl -w use strict; my $mytime=(time); my ($File,$FileStat,$CallOutDir); chdir 'C:/devl/bin/timedir' or die "Arghh!!! $!"; opendir(ROOT, ".") or die "Arghh!!! $!"; foreach $File (readdir(ROOT)) { next if $File=~/^\./; next if $File =~/\._Checking_File_Readiness_$/; # This is the *.fi +letype I want to ignore next if $File =~/\_Watched_Folder_Active_$/; # This is the single +file I'd also like to ignore if ($FileStat = (stat $File)[9]){ if ($FileStat <= ($mytime - 300)) { print "File older than 5min found. The file name is $File"; #send mail here.... last; } } }
In reply to Re: Re: ignore certain files in a folder search, and create a random .txt file
by dkaplowitz
in thread ignore certain files in a folder search, and create a random .txt file
by dkaplowitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |