in reply to 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
What warnings exactly? It should not give warnings as far as I can see. You need to be specific. There are really easy ways to do this stuff in perl. grep and glob are quite handy tools.....
# in simple pieces my $five_min = 5 / 60*24; # 5 minutes as part of day for M time my $dir = 'C:/devl/bin/timedir'; my @files_dirs = glob("$dir/*"); my @files = grep{ ! -d $_ } @files_dirs; my @want = grep{ ! m// and ! m// } @files; my @old = grep{ -M $_ > $five_min } @want; print "$_ is > 5 minutes old\n" for @old; # in one line: print "$_ is > 5 minutes old\n" for grep { ! -d and ! m/foo/ and ! m/bar/ and -M > 0.0035 } glob("C:/devl/bin/timedir/*");
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: ignore certain files in a folder search, and create a random .txt file
by dkaplowitz (Novice) on Mar 19, 2004 at 21:38 UTC | |
by tachyon (Chancellor) on Mar 19, 2004 at 21:43 UTC | |
|
Re: Re: Re: Re: ignore certain files in a folder search, and create a random .txt file
by dkaplowitz (Novice) on Mar 19, 2004 at 21:56 UTC | |
by tachyon (Chancellor) on Mar 19, 2004 at 22:03 UTC | |
by dkaplowitz (Novice) on Mar 23, 2004 at 15:07 UTC |