How to Search for Specific Filetypes in Gmail

by Michael on August 3, 2012 · 0 comments

I’ve long known how to search for messages with attachments in Gmail (just include the operator “has:attachment” in your search string) but I wasn’t sure how to search for attachments with a specific filetype — until now, that is.


As it turns out, it’s as easy as using the “filename:” operator. For example, to find .doc files, just search for:

filename:doc

or, if you’re looking for Word files in general, try:

{filename:doc filename:docx}

or, even simpler:

filename:{doc docx}

Note that wrapping your search terms in curly brackets is the same as stringing them together with the OR operator. By default, Gmail treats multiple search terms as if they’re connected by AND so you need to make the distinction.

For the record, you could also search for something like:

has:attachment {doc docx}

But since filename will only return messages with attached files, there’s no need to specify the presence of attachments. And yes, you can use this with just about any filetype, including: xls, xlsx, ppt, pptx, pdf, mp3, aac, txt, jpg, etc.

Of course, you can also restrict these sorts of searches to specific labels using the “label:” operator, or specific people using the “to:” or “from:” operators.

And so on. Pretty slick, huh?


{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: