There's an FAQ on the subject: http://faq.cprogramming.com/cgi-bin/...&id=1044780608
I want to make a program that will check for the folders in a root (for example: folder 1, folder 2, folder 3) and will save in a file the folder info (like how much files there is inside the folder, the total size of the folder, etc...)
Like this? (All files.)
Code:
$ stat `ls *` >> folderinfo
or this? (Directories only.)
Code:
#!/usr/bin/perl
foreach(<*>) {
if(-d) system("stat $_ >> folderinfo");
}
or this? (DOS folder-only listing.)
Code:
dir /ad /b > folderinfo.tmp