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)?
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.
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.
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.
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@example.com 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 wrote an app to search by folder (within file contents). It is a bit slow so be patient when it is loading.
You can take a look to the following tool: www.evenbytes.com/metadrive.html
This tool will help you to search within Google Drive Folders. In addition to that, the tool provides additional features such as filters or custom metadata.
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:absolute_path. You can get my code from here: https://github.com/songxf/drive-search-by-folder
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.
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:
- Restore your folder back
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
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!
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:
Maybe someone can figure out a way to get this to work as expected.
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.
protected by Community♦ Nov 27 '18 at 23:46
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?