giovedì 27 maggio 2010

Script PERL : Totals File in a Directory

This is a simple script to show total number of Files in a directory.

Script accepts in input one argument : Directory.


$totfile = 0;
opendir(my $dh, $ARGV[0]) || die;
while(readdir $dh) {
print "$some_dir/$_\n";
$totfile++;
}
closedir $dh;

printf(" Tot Files : $totfile \n");

Stay Connected.

Nessun commento:

Posta un commento

Goals 2025

 Hi all Today, first day of 2025 my goals for this year : 1. ENGLISH Improve listening comprehension  See at least one or two films in Engli...