Find empty files & folders

OneDrive stops uploading if it encounters an empty file or folder. How can I use DOPus 12 to list all empty folders and files in a directory?

Thanks,

Hans L

Use the Find panel. (Tools > Find Files)

Thank you, Leo! Worked like a charm.

Hans L

After my response above, I am deeply embarrassed to admit that I have no idea how to use Find to find empty files, in spite of 1/2 hour trying (and searching). Please ...

Hans L

On the right of Tools > Find Files > Simple:

Clipboard%20Image

I actually did this, but got no hits (in spite of knowing there were empty files in the folder I was searching). And, the files in question (.docx) are not 0 in size, but, for instance, 14 KB.

Hans L

If it's 14KB in size then it's not an empty file (even though the file may represent an empty word document).

Jon, I do understand what you are saying, but I am confused. Can't an empty file be > 0 in order to accommodate some file structure that is always there (whether a file is empty or not)? Well, what I should ask is: What is the difference between an empty file and an empty Word document? Or, what type of files are 0 bytes when they are empty?

I assume I need a program that can check if there is anything in a file, not only metadata (if I am using that term correctly here).

Thanks for your input!

Hans L

A file that is really empty will be zero bytes in size. Anything else is not technically an empty file.

A document, archive, or whatever might be conceptually empty while not actually being an empty file, but that's not something you can test for in general.

e.g. A zip archive without anything in it is still usually about 22 bytes. It will still have a header and other information which is always at the start and end of a zip file, even if that information ultimately just says "I'm a zip file, but there's nothing inside of me."

There isn't really any way to test for conceptually empty files, except via code that actually knows how to parse every one of the formats you are interested in, and has logic to decide what "empty" means, which even then is a fuzzy idea. (e.g. A Word document might not have any text on any of the pages, but it might have an Author and 150 word description written into the information fields. It would not be the same file as you'd get if you created a new Word document, but you might still consider it "empty", unless that 150 word description was important, in which case you might not...)

What are you actually trying to do here? The thread started off about solving a problem with OneDrive mishandling empty (presumably zero-byte) files, but it sounds like you're doing something else now? Do you have lots of unstarted Word documents strewn around that you're trying to clean up, or something else?

Thanks, Leo, for this great explanation.

Yes, I was trying to clean up. Wonder if there is not an app out there that will check for "empty" docx files? I'll check around.

Hans L

I don't think you'll find such a tool. In case you don't, I'd offer the suggestion that you filter to show only the files you want (like *.doc|docx) and sort the result by size. For the most part, the really small ones should be what you're wanting to eliminate. Just open them and check them out.

Also note, depending on how they were created, they can have meta-data that can affect their file size. The below screenshot snippet is from a document I have on my computer. The extra meta-data shows when I click the File tab and click "Show All Properties" on the bottom right of the Info page. Although, I don't think it would affect the size significantly, it could explain different sizes you come across as you check the different small sizes you find.

DesertDwarf, thanks for the tip. Yes, you are right, because I used UltraFinder to find duplicate files, searching on Content, in a folder with two "empty" docx files, and got no hit. Didn't even get a hit when I entered the same text ("Hello!") in the two files and then run the program again. Not encouranging!

Hans L