in reply to file managing under windows
A quick google search for "perl file attributes" presented This link to a list of file characteristics (along with many others) you can use as evaluation criteria.#!C:/perl/bin/perl.exe; use strict; use warnings; use Cwd; # delete .xcp files older than 10 days #Identify my current directory and record it to $cdir my $cdir = getdcwd(); #create an array of all files with an exntesion of .xcp my @files = glob("*.xcp"); foreach my $file (@files) { # for each element of the array delete if mod date is greater than 10 +days unlink "$cdir\\$file" if -M $file > 10; }
I hope this helps.
generator
|
|---|