The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 02-21-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
I created a small perl script .. see if it works for you:

Code:
#!C:\Perl\bin\perl.exe
 use File::Find;
 my @oldFiles;
 print "Content-type: text/html\n\n";
 find(\&cleanup, "C:\/WINDOWS/Temp/");
 sub cleanup {
   my $daysOld = ((time - +(stat($_))[9]) / 86400);
   if (/\./ && $daysOld >= 1 && $daysOld < 2) {
      push(@oldFiles, $File::Find::name);
   }
 }
 print @oldFiles;
If you want to search an entire drive, replace C:\/WINDOWS/Temp/ with C:\\

References:

http://techupdate.zdnet.co.uk/story/...122110,00.html
http://techupdate.zdnet.co.uk/i/z/tu...inga110902.htm

http://www.xav.com/perl/lib/Pod/perlfunc.html#item_stat