In Google Drive, is there a way to search only the contents of files within a particular folder (instead of files within the entire drive, as is the default)?

  • It doesn't look that way, no. You can filter by owner, date, sharing status; but not by folder.
    – ale
    Commented Feb 4, 2013 at 18:01
  • 7
    Try the in:folder_name operator (e.g. in:folder_name search_term. Found here.
    – Alex
    Commented Feb 4, 2013 at 18:02
  • 1
    @Alex yes, why not add that as an answer, it's what I would have suggested :) Commented Feb 4, 2013 at 18:05
  • 5
    @Alex Sorry, I just tried what you said, but apparently it doesn't work (no results even when I know the file is there).
    – Hydra
    Commented Feb 5, 2013 at 11:00
  • 2
    What's funny is that if I search and Google Docs says "documents found in Trash" and I click "view" it shows me "<docname> in:Trash" but if I do that search....it returns NO RESULTS. Geesh... Google. WTF? Commented Oct 29, 2013 at 18:45

13 Answers 13


Google just announced that now they included a the search within folder feature.

From the above link:

You can now search for content in a specific folder in Google Drive. Select the drop-down in the search bar and choose the folder you want from the Location menu, or right-click on a folder and search within that folder. Only folders that are within your My Drive or within Team Drives can be searched; if you have a folder that is shared with you, first add the folder to your My Drive.

  • This does not work. Following these instructions just opens the folder, rather than searching within it. Commented Jul 6, 2021 at 15:05
  • Please read the instructions again and follow them carefully. If you still need help, post a new question. Commented Jul 6, 2021 at 15:43

Simply star the folders or particular files that you wish to search and then search "is:starred". Unstar them once you want to search something else. It's a little impractical, but it's what I do to search my journal articles, 1000s of which I've stored on my Drive.


As of the date of this post, Google Drive does not support searching within a specific folder. However, the new Docs, Sheets, and Slides home screens do have a way to let you do this via the File Picker search interface:

  • Go to: https://docs.google.com

  • Click the File Picker folder icon on the right side of screen.

  • Navigate to the specific folder that you want to search.

  • Now put your query term in the file picker's search box and hit 'Enter' (Or click the 'Search for all items containing ')

Your search results will only come from the folder you selected.

Note: you can still filter by file type in the File Picker search bar by clicking the drop down arrow.

  • 1
    why doesn't drive search show you the containing folder name? Commented Dec 16, 2015 at 18:23
  • 1
    This is a rather convoluted way of doing it and ignores people who mostly use drive.google.com. Obviously the view count of this page shows that missing folder searching in their interface was very short sighted on Google's part. Sigh.
    – deltaray
    Commented Sep 7, 2016 at 18:13
  • @deltaray I'm guessing somewhere at Google there is some risk analysis regarding features, e.g., cost of implementing+maintaining a feature vs benefit in data acquisition. Commented Nov 1, 2016 at 15:12
  • Unfortunatelly, this doesn't search subfolders nor does it allow wildcards / requires full keyword. For illustrations and more details: quora.com/…
    – cregox
    Commented Dec 3, 2016 at 8:40
  • 2
    @SuperUberDuper This can (now) be seen by, after entering your search query in drive search, hitting enter, selecting the file below the search bar and viewing the details of the file (icon that looks like an "i", then choose the details tab (as opposed to the activity tab)). If the file has a parent (location) it will be listed there next to the folder icon. Commented Feb 13, 2019 at 13:12

A time-consuming work around, which isn't so painful if there are just a few folders you want to search, is to share those folders with other Google accounts, and then include to: [email protected] in your search.

The script in user165768's answer also works. It asks you to share a scary bunch of permissions, so you may want to look at the code at https://github.com/ljv5555/drive-folder-search/tree/gh-pages/app to reassure yourself, and possibly make your own copy.


I have written a simple Python script that can tag your files with folder, after which you can easily search by folder just by typing folder:folder_name or folder:absolute_path. You can get my code from here: https://github.com/songxf/drive-search-by-folder

  • so, it basically adds the folder path into description, pre appended by "SBFTK:folder:", and replaces it for when you move files around and run again, right? not too shabby! but what is sbftk?
    – cregox
    Commented Dec 3, 2016 at 10:27
  • @cregox My guess: sbftk is search by folder something something, maybe search by folder tag something. Commented Jan 26, 2017 at 19:29

One solution: gdrive, which is a CLI for Google Drive.

To find items in a given folder, you use

gdrive list -q "'folderID' in parents"

To get the folderID, navigate to the folder in GDrive, then from the URL copy the ID, e.g., if I go to my folder "Pictures" the URL is

So the folderID is 0B1FVU07aR9pFcDhFbUdkdhF9Oam8

gdrive allows you to use all the search capabilities of the API which are far more robust than the GUI.

However, this doesn't seem to be recursive, i.e., it only finds direct children of the given folder, not anything deeper.

What's interesting, and worth exploring, is that if I use a folderID and search from the GUI like "in:0B1FVU07aR9pFcDhFbUdkdhF9Oam8" then Google Drive shows the correct name of the folder almost like a filter in the GUI!

enter image description here

But it does NOT really work; I cannot find anything in the folder, and the GUI shows this error at the bottom of the screen:

enter image description here

Maybe someone can figure out a way to get this to work as expected.


If you don't like clicking through the folder selector in the Location drop-down, you can use the parent: search operator in the Search box with the Folder ID.

For example, if f0LdEr-1D_abcdefghijklmnop is the folder ID you see in the address bar when you open the folder, add parent:f0LdEr-1D_abcdefghijklmnop to the search box.

Screenshot of folder ID in URL being copied to the search box next to "parent:" operator

When you hit Enter, parent:f0LdEr-1D_abcdefghijklmnop will disappear from the Search box, but it will still be visible in the URL. Right below the search box, you will see "Searching in 📁Foldername ✖" (where Foldername is the name of the folder).

Screenshot of "parent:" search operator in URL, but not in search box, with a circle around "Searching in Foldername"


I don't think there is such a feature available in Google Drive yet, but you can do a workaround.

If you do not intend to search for files recursively, simply just open the folder you want to search in and use the browser function (Ctrl+F) to search the name of your desired file.

Of course using this method you can't search within the file itself for text matches.

  • 2
    Yes, unfortunately I want to search content within files, not just filenames. I'm also looking to be able to recursively search within a folder (including subfolders). Thanks for the suggestion, though! Commented Feb 11, 2013 at 21:42

There is another workaround that does not require any third party app or extension.

  • Remove your folder (in which you wanna search something)
  • Search with is:trashed filter. For example: is:trashed query_string
  • Restore your folder back
  • For me, this only finds FOLDERS that are trashed, but not anything WITHIN those folders.
    – d0g
    Commented Aug 26, 2017 at 10:48

Search within a folder is now available as of January 2018.

You can right-click on a folder name and Select 🔍 Search within folder_name and it'll let you do so from the search bar of Google drive.

You can right-click on a folder from:

  • Left navigation panel
  • Folders inside My Folder
  • Upper navigation helper
  • Folder from 'Shared with me'
  • Second level folders from one of your synced 'Computers'

If you want to search for text inside the files, you could search your drive for the text, then use (Ctrl+F) to search for the folder name. A little messy, though, and again, not recursive!


I have had very inconsistent success with:


This is somewhat inconsistent though.

This is how Google lets you search your Trash: e.g. before:2013-06-01 in:Trash


Another solution – if you have a G Suite account – is to use a Team Drive. You can create a new Team Drive, not share it with anyone, and move folders into it. Then you can narrow your search to only the Team Drive.

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.