Gmail – How to Find Attachments by Size

gmailgmail-search

I am searching a mailbox for the mail that first brought a specific attachment. Since the original mail, the attachment has been saved to associated Google Drive and likely been renamed too.

Since it has been renamed, filename:CurrentFileName.pdf searches don't find my document under the filename I know. The only thing I can think of that is likely not to have changed is the file size (PDF files should not change size).

In short: It's easy to search the mailbox by email size (size:) but what about attachment size? Is there a syntax like attachment:size?

Side note: a search by email size within a 5kB range around the file size found nothing, most probably because the original mail has several files attached.

Best Answer

Unfortunately, there's no search filter for attachment size (though that would make a good feature request).

The closest you'll likely be able to get is to use several search parameters to try to find a group of emails that might contain the one you're looking for. You could try:

has:attachment filename:pdf larger:{minSize} 

Replace {minSize} with a size that you know is smaller than the attachment.

If you have any idea when the email was sent, you can include an after: or before: filter -- or both -- to narrow it down even further.

If you remember at least part of the file name, you can use wildcards in your search. For example, you could search for filename:report*.pdf or filename:*report*.pdf.

Other filters can be added, depending on any other information you might have, such as the sender's name, whether the email was marked as "important," etc.