Google Drive Search for Files and Folders

The Google Drive Permissions Auditor add-on uses a Google Script to analyze who has access to your Google Drive files. You can use any of the search operators of the Google Drive API to query for files in Google Drive whose metadata match your search criteria.

1. Find all files in my Google Drive owned by me except those in trash

"me" in owners and trashed = false

2. Search for files that begin with the term “IMG”

name contains 'IMG'

The contains operator only performs prefix matching for a name. For example, the name “HelloWorld” would match for name contains ‘Hello’ but not name contains ‘World’.

3. Search files that contain the word “ctrlq” anywhere in the content

fullText contains 'ctrlq'

The contains operator only performs matching on entire string tokens for fullText. For example, if the full text of a doc contains the string “HelloWorld” only the query fullText contains ‘HelloWorld’ returns a result.

4. Find all image files modified since January 30, 2016

modifiedTime > '2016-01-01T12:00:00' and mimeType contains 'image/'

5. Find all audio & video files that are not owned by me

sharedWithMe and (mimeType contains 'video/' or mimeType contains 'audio/')

6. Search for files containing the text “important” and are in the trash

fullText contains 'important' and trashed = true

7. Search for all Google Sheets in Google Drive (Supported MIME Types)

mimeType = 'application/'

8. Search for files where is an editor (writer)

'' in writers

9. Search files that do not contain the word “ctrlq” in the content

fullText not contains 'ctrlq'

10. Search files that are not JPG images

mimeType != 'image/jpeg'

If you need help with writing search queries, please contact the developer.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory


Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.