my $dir = 'c:/temp';
my
@files = `dir /S/B/A:-D $dir`;
foreach my $file (
@files) {
chop($file);
print "$file\n";
if (-f $file) {
print -s $file."\n";
}
}
The program will work fine when file name doesn't contain any special character,
If the file name contain any special character, it wont' read the file size. (e.g. Fraéice.txt )