in reply to Re: Notification of a new file added to directory
in thread Notification of a new file added to directory
#!/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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: NOtification of a new file added to directory
by gjb (Vicar) on Jan 03, 2003 at 15:43 UTC | |
by Anonymous Monk on Jan 03, 2003 at 18:00 UTC |