Jul-20-2021, 06:47 AM
(Jul-20-2021, 06:08 AM)tester_V Wrote: I'd like to find Directories that have size=0.
Why? What do you think that means? You can't use that to find directories that have no children. You can't use that to find directories that have empty files. So I don't think looking for it is useful.
Quote:Some of the directories have files, empty files, files that have a size=0.Yes, but that is the file that has size==0, not the directory. You need to iterate in the directory and look for every file inside that has st_size==0. That's what my previous example does.
Quote:'C:\02\zero' is a subdirectory of "02" directory, it is my testing subdirectory and I called it 'zero'.
I was wondering if I can do that (find directories the size=0) with "pathlib.Path"
You can, but I don't see how it would be useful to do so.