How To Quickly Find Messages With Attachments In Gmail

email attachmentsThere are plenty of reasons to love Gmail: completely free features, plenty of storage space, free POP3 access to your email as well as free offline access to your email messages via the IMAP route, and many other awesome great options.

As the search geek, there’s one thing I really appreciate: the ability to use very flexible (advanced) search features to go through thousands of email messages stored for years in one place. I am not geeky (and probably organized) enough to synchronize my email efficiently when moving from computer to computer or to make and update my backup, and (I realize that might be my mistake) I have been used to relying on Gmail for years.

This post looks at one of Gmail life-saving features: the option to store and search through tons of email with attachments for you to be able to:

  • Quickly and efficiently find email attachments (even if you can hardly remember the file name, the sender name, the date when you received the email, etc).
  • Free up some space (yes, storage space is huge but not unlimited. In case you have ever sent or received high resolution photographs, videos or large database files, you may want to delete them to save on space).

Search For Email With Attachments

There are several ways to search for attachments in Gmail using Gmail advanced search operators:

  • has:attachment – This one filters emails to only those that have anything attached.
  • has:attachment doc – This one filters emails to only those that have .doc files attached.
  • filename:.doc – Works almost exactly as the above one (but this one is the documented operator for searching attachment types).
    • Note: filename: already implies that there should be an attachment included, so you don’t need to use has:attachment together with it.
    • Note: a dot is not required before the file extension: filename:.doc = filename:doc
  • filename:google*.doc – This one filters emails to only those that have doc files attached and these files have [google] in the beginning of the name (whereas filename:*google*.doc searches for messages that have documents attached with “google” mentioned somewhere in the middle of the file name).
  • filename:.doc OR filename:.html – This one filters emails to only those that have either .doc or .html files attached (or both).
  • filename:.doc AND filename:.html- This one filters emails to only those that have both .doc or .html files attached.

find attachments in Gmail

See What’s Attached From Search Results

Now that we know how to locate our email attachments, let’s learn to cope with one inconvenience: you have no idea what is attached until you enter the actual message scroll down and see the attached file names.

Pimp My Gmail is an awesome Greasemonkey script that lets you quickly see what is attached without the need to click away from Gmail search results. The script is compatible with Firefox, Google Chrome and Opera.

Note: The script has a lot more features to customize your Gmail but I am only using it for the sake of the attachment feature.

With the script installed, you will be able to see:

  1. An icon representing the attached file extension right in the email list;
  2. The actual file names attached (on hover over):

search attachments in Gmail

Locate Your Largest Email Attachments: Find Big Mail

Find Big Mail is a free service that lets you sort your email by size. It does require access to your Gmail account (using Gmail OAuth, so as far as I understand, it doesn’t store your Gmail password and you can make sure the access is removed immediately after you use it in your Gmail account).

After you grant access to your Gmail account, the tool will immediately start scanning your messages. It may take some time. Once it’s done, you’ll receive an email notification which brings you to the stats page:

gmail attachments

What you can do now is log into your Gmail interface, click through your full label list and find some new labels created by FindBigMail app. The labels will organize your largest emails by size:

  • Top (the largest emails).
  • 2mb’ messages are larger than 2,000,000 bytes.
  • 500kb’ messages are between 500,000 and 2,000,000 bytes.
  • 100kb’ messages are between 100,000 and 500,000 bytes.

gmail attachments

Click on each label to view the large messages. Then follow these Gmail instructions to remove the mail you no longer want. Be sure to empty the Trash using “Delete Forever” if you need to free up the space immediately. Otherwise it will automatically be removed in 30 days time.

Otherwise, consider using this smart way to locate your largest messages (be sure to use the has:attachment filter if you have too many emails stored in your account to make it work).

Any other Gmail attachment tips to add to the mix? Please share them in the comments!


MakeUseOf Recommends

Ann Smarty

Ann Smarty is an SEO Consultant at seosmarty.com, Internet marketing blogger and active social media user. Please follow Ann on Twitter as seosmarty

The comments were closed because the article is more than 180 days old.

If you have any questions related to stuff mentioned in the article or need help with any computer issue, just ask it on MakeUseOf Answers.

Hide 24 Comments

  • hari baskar January 23, 2011
    0 likes

    Hi
    good tips for Gmail users … thank you

    Hari baskar
    http://www.millionairecycler.c

    | Like
  • Jake P. January 23, 2011
    0 likes

    If you have an email program like Outlook or Thunderbird, add gmail as an IMAP account, and then in your “All Mail” folder, sort the messages by size.

    | Like
    • Ann Smarty January 23, 2011
      0 likes

      Yes! Great suggestion! That’s something I referred to as one “smart way” in the last but one paragraph, I guess!

      | Like
    • Aibek January 24, 2011
      0 likes

      that’s exactly what i do :-)

      | Like
  • Jake P. January 23, 2011
    0 likes

    Well, I didn’t really click on the last link. I was reading the article, and thought I’d throw in my two cents. Should’ve clicked on that last link!

    | Like
    • Ann Smarty January 23, 2011
      0 likes

      Not a problem at all! In fact, I really appreciate it that you brought up that great point again!

      | Like
  • Chris January 24, 2011
    0 likes

    Very helpful. I’m so disorganized that it’s sickening.

    | Like
  • Anonymous January 28, 2011
    0 likes

    And you can save your has:attachment search results as a quick link with the Quick Links lab.

    | Like
    • Ann Smarty January 28, 2011
      0 likes

      Another bright idea – thanks!

      | Like
  • Moneystylemoga January 29, 2011
    0 likes

    hellooooooooooooooooo

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Your “filename:*google*.doc” example simply doesn’t work. The only way I can find an email based on the filename is to know the ENTIRE filename.

    filename:*1218001* .pdf – returns zero hits.

    while:

    filename:*1218001_Area 3_LUAGT018_11030317* .pdf – returns the email I am looking for.

    | Like
  • Ann Smarty March 8, 2011
    0 likes

    Actually it does work with me. I have uploaded a screenshot for you: http://www.makeuseof.com/wp-co

    Please mind that * is treated as a word, not as part of a word. Gmail search must be treating underscore _ as the word: so that whole filename was treated as one word…

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Thanks Ann. I’m suspicious of your results. Is the word “Google” also within the text of the email?

    If not, can you please tell me what to type to find all the emails that have files attached whose filenames include “1218001″?

    | Like
  • Ann Smarty March 8, 2011
    0 likes

    Would you trust my word or would you want me to make another screenshot for the next search result? :)

    Have you tried something like that:

    has:attachment 1218001

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Of course I believe you.
    Of course I’ve tried that.
    Of course I made my own screen shots.

    http://ditdir.com/Found.jpg
    http://ditdir.com/Found.jpg

    ^^ There they are ^^

    I didn’t bother blocking out anything.

    | Like
  • Ann Smarty March 8, 2011
    0 likes

    Actually it does work with me. I have uploaded a screenshot for you: http://www.makeuseof.com/wp-content/uploads/2011/03/gmail-search.jpg

    Please mind that * is treated as a word, not as part of a word. Gmail search must be treating underscore _ as the word: so that whole filename was treated as one word…

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Google doesn’t list any supported boolean operators for FILENAME:

    http://mail.google.com/support

    | Like
  • Ann Smarty March 8, 2011
    0 likes

    Would you trust my word or would you want me to make another screenshot for the next search result? :)

    Have you tried something like that:

    has:attachment 1218001

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Of course I believe you.
    Of course I’ve tried that.
    Of course I made my own screen shots.

    http://ditdir.com/Found.jpg
    http://ditdir.com/Found.jpg

    ^^ There they are ^^

    I didn’t bother blocking out anything.

    | Like
    • Ann Smarty March 9, 2011
      0 likes

      Unfortunately, I am not aware of either Google or Gmail operators that can search for part of the word (versus part of the phrase).

      If anyone reading this can come up with a good solution, that would be awesome.

      Maybe, posting your question to MUO Answers would result in more people looking for the answer for you.

      | Like
  • Troy Goldman March 8, 2011
    0 likes

    Of course I did. I posted a response with links to pictures, but alas, my post needs to be approved by the moderator.

    | Like
  • Troy Goldman March 8, 2011
    0 likes

    Google doesn’t list any supported boolean operators for FILENAME:

    http://mail.google.com/support/bin/answer.py?answer=7190

    | Like
    • Ann Smarty March 9, 2011
      0 likes

      Well, they have plenty of undocumented operators. Besides, most of the official operators can be combined – which is what we are doing.

      | Like
  • Ann Smarty March 9, 2011
    0 likes

    Unfortunately, I am not aware of either Google or Gmail operators that can search for part of the word (versus part of the phrase).

    If anyone reading this can come up with a good solution, that would be awesome.

    Maybe, posting your question to MUO Answers would result in more people looking for the answer for you.

    | Like