Join Scott Simpson for an in-depth discussion in this video Working with files in Drive, part of Learning Google Apps Script (2013).
Let's take a quick look at the drive class.…The drive class allows access to the data in Google Drive.…You can use it to list, create and remove files…and folders and query information about file types and folder information.…To create an empty folder, I'll switch over to the Script Editor.…To create an empty folder, I'll use the…create folder method on the drive app class.…And now that I have a folder object, I'll…go ahead and add an Editor using the addEditor method.…
Now I'll run this.…And they can see that the folder was created.…If I switch over to the email account of the user that I shared this…folder with, you'll see that there's an…email here indicating that I've shared that folder.…Of course if you're working with a…particular folder or file during script development you…can use the get ID method to get the ID of an object you created.…Or use the ID from the URL with a get folder by…ID or get file by ID methods of the parent drive app class.…
I'll copy the ID of the folder that I just…created, and I'll replace these lines with a…
- What is Google Apps Script?
- Creating and editing files with Apps Services
- Storing data for your script
- Using events and triggers in containers
- Building custom spreadsheet functions
- Sharing your script as a web app
- Serving JSON or XML from your script
- Publishing your app in the Chrome Web Store