Reputation: 1090
I have a UIapp generating a searchstring for exploring my google drive.
The searchstring looks like
DDL after:2014-01-31 before:2014-05-01
I would like to use this in one of the following three ways
a) perform a search on Google Drive by calling a methode from the UIapp and show results in the Google Drive window
b) enter searchString programmatically in the textBox at the top of the standard Google Drive window and execute the search
c) perform the search in the browser and display results either in the opened Google Drive window or in a separate window. for that searchString will be changed into
var searchString = 'https://drive.google.com/?#search/DDL after:2014-01-31 before:2014-05-01';
But (as I'm new to GAS) I don't know (yet) how to how this site.
What will be best method to use and how can I do it?
Upvotes: 0
Views: 120
Reputation: 1424
If your intent is to use Google Apps Script to search for files on Google Drive, you should take a look at the Apps Script Advanced Drive Service. This is a means of connecting Apps Script directly to the Drive web API. Note that the Advanced Drive Service needs to be enabled before it can be used.
Example of using the service to list Drive folders
You can adjust the query string using different Fields, including the modifiedDate (dates need to be in RFC 3339 format, such as 2012-06-04T12:00:00-08:00).
Once you've retrieved a list of files matching the query, they can continue to be manipulated in Apps Script (opened, read, modified, or deleted).
Upvotes: 1