Thanks,use strict; use File::Find (); use Win32::FileSecurity; #! D:\Perl\bin\perl.exe -w eval 'exec D:\Perl\bin\perl.exe -S $0 ${1+"$@"}' if 0; #$running_under_some_shell #! D:\Apps\codemagic\lang\perl\bin\perl.exe -w # eval 'exec D:\Apps\codemagic\lang\perl\bin\perl.exe -S $0 ${1+"$@ +"}' # if 0; #$running_under_some_shell open(OUT, ">> output.txt") || die "can't open output.txt: $!"; # Get full date for report. my $Date = localtime (time); #print OUTPUTFILE "----------Open log $Date ----------\n"; # Set the variable $File::Find::dont_use_nlink if you're using AFS, # since AFS cheats. # for the convenience of &wanted calls, including -eval statements: use vars qw/*name *dir *prune/; *name = *File::Find::name; *dir = *File::Find::dir; *prune = *File::Find::prune; # Traverse desired filesystems print " Access DB's Modified between now and 6 Months ago\n"; File::Find::find({wanted => \&wanted}, '\\\\lindoze /c$'); close(OUT); exit; sub wanted { my ($dev,$ino,$mode,$nlink,$uid,$gid); /^.*\.bat\z/s && (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && (int(-M _) > 0) && (int(-M _) < 180) && print("$name\n"); }
PerlNOOB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |