SHARE
TWEET

Untitled

a guest Oct 16th, 2011 42 Never
  1. use File::Find::Rule;
  2. use Win32::Shortcut;
  3. use Spreadsheet::WriteExcel;
  4.  
  5. my $workbook  = Spreadsheet::WriteExcel->new('status.xls');
  6.  
  7. my $worksheet = $workbook->add_worksheet();
  8.  
  9.  
  10. my $base_dir ='E:/files/';
  11.  
  12. my $find_rule = File::Find::Rule->new;
  13.  
  14. #$find_rule->maxdepth(1);
  15.  
  16. $find_rule->name('*.lnk');
  17.  
  18. my @files = $find_rule->in($base_dir);
  19.  
  20. print scalar(@files)."\n";
  21.  
  22. #print join("\n", @files);
  23.  
RAW Paste Data
Top