Count only dirs that hava files
Moderators: Hacker, petermad, Stefan2, white
Count only dirs that hava files
I have quite large dir tree, consisted of many subdirs, but only dirs on last level contain files. Not all dirs are same depth. I need to count only the dirs that contains files, but not the dirs containing subdirs. Any idea for simplest/fastest approach?
2ehab
Sorry, that doesn't work. Finds all the folders.
2MVV
Filecount also counts all files in the folders, and finds all folders.
Luckilly, dirsizecalc supports definition of custom fields, so i defined a field file count without recursion, so it only counts files on current folder level. That way I can search for folders with filecount>0 and TC can find only folders that actually contains files, not folders that have folders with files.
Sorry, that doesn't work. Finds all the folders.
2MVV
Filecount also counts all files in the folders, and finds all folders.
Luckilly, dirsizecalc supports definition of custom fields, so i defined a field file count without recursion, so it only counts files on current folder level. That way I can search for folders with filecount>0 and TC can find only folders that actually contains files, not folders that have folders with files.
2Lefteous
To define a custom size, let's say name: 4GB-usb, size 4GB. So the value of a folder with size 6GB will be 1,5, or size 2GB will display as 0,5.
CD or DVD are also very useful custom unit sizes.
It is useful to check if folder/file will fit on that media or how many of that media will be needed. I know that this cannot be 100% accurate, depending on filesystem used etc., but will give a very good approximation.
To define a custom size, let's say name: 4GB-usb, size 4GB. So the value of a folder with size 6GB will be 1,5, or size 2GB will display as 0,5.
CD or DVD are also very useful custom unit sizes.
It is useful to check if folder/file will fit on that media or how many of that media will be needed. I know that this cannot be 100% accurate, depending on filesystem used etc., but will give a very good approximation.