Find only directories?

Is there any way in DO to find only directories having a zero size (that is, no files in their subtree, even if directory entries exist in their subtree).

John Land

Sorry, nevermind, figured it out (I was looking for implementation of the "Directory" attribute -- needed to use the DO function TYPE function to match "[folders only]")

John Land

Hi John,

Read your message, and thought great, thats exactly what I want to do. But I can't get it to work, could you please elaborate a bit on how you have done it.

I've set a filter to match TYPE 'folders only' and a second filter to match AND 'size' = 0 bytes.

But it returns nothing, even on test folders where i know there are empty folders further down. I have tried with the Subfolder tickbox checked and unchecked, still nothing.

I know i can view a folder with the size settings visible and then sort the empty folders to the top, but thats not how i wanted to do it, I need to sift through hundreds of folders and clear out the empty ones.

If anyone can help. Thanks

Quad --

Acutally, your solution is what I did. After I found all (and only) directories in a subtree, I displayed them in flat view, sorted by size, and selected and deleted the empty ones. Not very intuitive -- what SHOULD occur is that all zero size directories are selected by Type=DIR and Size= 0, or Attribute=DIR and Size=0 (which I find more intuitive and in synch with terminology from other products).

John Land

Correction -- I didn't use flat view, because it was unavailable as an option. I just sorted the selected directories by size and deleted the EMPTY and zero byte (meaning they contained at least one zero byte file) directories.

John Land

Folders reported as Zero bytes may also just contain sub-folders also containing either nothing or yet additional 'empty' sub-folders.

I would submit a bug report to GPSoft regarding type-[folders only] and equals-0 bytes not finding anything. And since 'truly' empty folders seem to be cased off specially, it might actually be a good feature request to have a special find option for [Empty Folders] added...

Thanks for the responses guys.

I only purchased DOpus a few weeks ago and guessed that I might be going about things the wrong way, but after your input i just might submit that bug report after all.