TransWikia.com

In Google Drive, is there a way to search files located in a particular folder?

Web Applications Asked by Jon Schneider on February 4, 2021

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)?

15 Answers

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"

Answered by browly on February 4, 2021

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'

Answered by BorhnN on February 4, 2021

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.

Answered by Rubén on February 4, 2021

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

Answered by Dan on February 4, 2021

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
https://drive.google.com/drive/u/8/folders/0B1FVU07aR9pFcDhFbUdkdhF9Oam8

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.

Answered by Dan on February 4, 2021

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

Answered by GS Shahid on February 4, 2021

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.

Answered by Ed J on February 4, 2021

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.

Answered by meshah on February 4, 2021

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

Answered by Xianfeng Song on February 4, 2021

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.

Answered by tog22 on February 4, 2021

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.

Answered by cudonfls on February 4, 2021

I wrote an app to search by folder (within file contents). It is a bit slow so be patient when it is loading.

https://script.google.com/macros/s/AKfycby6G32K-vKCiLmoKvMtG64cYPHEREEx1PY5IoYrEYaR6WAfbXs/exec

Answered by user165768 on February 4, 2021

I have had very inconsistent success with:

in:<foldername>

This is somewhat inconsistent though.

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

Answered by Clay Nichols on February 4, 2021

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!

Answered by Joel on February 4, 2021

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.

Answered by Hydra on February 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP