#!/usr/local/bin/perl use strict; my $mydir = "/mydirectorypath/directory"; my $new_one = 0; opendir(DIR, $mydir) or die("..."); while (my $file = readdir(DIR)) { if (-M $file < .5) { $new_one = 1; last; } } closedir(DIR); print "$new_one\n";
In reply to Re: Re: NOtification of a new file added to directory
by Anonymous Monk
in thread Notification of a new file added to directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |