in reply to Deleting Files on NT
I bet you don't supply the full path to the file you are trying
to delete.
As to the dates of files:my $dir = "dir/foo"; opendir(DIR, $dir); foreach my $file ( readdir DIR ) { unlink "$dir/$file"; }
- -M Age of file in days when script started.
- -A Same for access time.
- -C Same for inode change time.
But you can also use the stat command. But remember to give a correct path to the file or else it will obviously not work :-)my $m_time = -M "$dir/$file";
As a note, I still do this error all the time :-) Autark
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: Deleting Files on NT
by steveAZ98 (Monk) on Jul 24, 2000 at 18:38 UTC |
In Section
Seekers of Perl Wisdom