say "Testmode #####################" if $testmode; #### search files my $rule = File::Find::Rule->new(); my $progress_count = 0; # count of files to have action my $total_count = 0; ... $progress_count++; $total_count++; ... print "\ntotal files: ".$total_count."\n"; $rule->in(@dir); #start search in dirs now