5.3 Search by query + Remove shortcut from Folder
Additional function for search results on Google Drive
 
e.g. mimeType = 'image/jpeg'                        
 
 
insert Folder ID ,see URL folders/... 
 
 
Search and Remove from Folder
 
 
✓  test only one file
 
 
Search files by query
detects  Existing folder on google Drive by folder ID
unlink files with Existing folder without deleting.
Google Drive has a  function to create many Folders for one file. it looks like, shortcut in another folder, but really folders are connected to only one file . if you delete any folder  with file,  you delete file everywhere, because file is one, and it is not represented by an independent shortcut. for remove file location open file  > details > Location > remove.  linked Folder does not have size. 

This function allows user to search files by query and automatically remove their location from indicated folder without file deleting.

 
Folder ID on Google Drive is located in the browser address bar 
 (open folder and from address bar copy ID after – ” /folders/....” )

https://drive.google.com/drive/u/0/folders/0B_z6IokOI27EQnViRFRCYjM3akE

Search not work for very new files and need time before Google Drive indexes them.

for collect all files  uncheck " test only one file ".
in demo version user can unlink only one file .



examples of search query


fullText contains 'invoice'
- remove all  invoices from the specified folder on Google Drive. 

modifiedDate > '2016-06-18T12:00:00'
- remove all files from the specified folder , on Google Drive, which are modified after  2016-06-18T12:00:00

fullText contains 'invoice' and modifiedDate > '2016-06-18T12:00:00'
- remove all  invoices modified after  2016-06-18T12:00:00, from the specified folder on Google Drive. 

sharedWithMe and fullText contains 'invoice'
- remove all invoices ,  shared With me from the specified folder on Google Drive.

mimeType contains 'image/'
- remove all images from the specified folder on Google Drive 

mimeType = 'image/jpeg'
-remove all jpg files from the specified folder on Google Drive.
 
mimeType = 'image/bmp'
remove all bmp files from the specified folder on Google Drive.

mimeType contains 'video/'
remove all video files from the specified folder on Google Drive.

mimeType = 'video/avi'
remove all avi files from the specified folder on Google Drive.

mimeType = 'video/mpeg'
remove all video mpeg files from the specified folder on Google Drive.

mimeType = 'video/quicktime'
remove all quicktime files from the specified folder on Google Drive.

mimeType = 'audio/'
remove all audio files from the specified folder on Google Drive.

mimeType = 'audio/mp3'
remove all mp3 files from the specified folder on Google Drive.

mimeType = 'audio/wav'
remove all wav audio files from the specified folder on Google Drive.

mimeType = 'audio/midi'
remove all midi files from the specified folder on Google Drive.

mimeType = 'audio/mpeg'
remove all audio mpeg files from the specified folder on Google Drive.

mimeType = 'text/html'
remove all html files from the specified folder on Google Drive.

mimeType = 'application/vnd.google-apps.spreadsheet'

- remove all  Google sheet files from the specified folder on Google Drive. 

mimeType = 'application/vnd.google-apps.document'

- remove all  Google Doc files from the specified folder on Google Drive.