Join Scott Simpson for an in-depth discussion in this video Working with files in Drive, part of Up and Running with Google Apps Script.
- Of course, there's more to Google apps…than Docs and Sheets.…So, let's take a look at Drive,…where you can store files of any type.…The Drive service allows access…to data in Google Drive.…You can use it to list, create,…and remove files and folders;…and to query information about file…types and folder information.…Over in My Drive, I'll upload…a folder of files to work with.…And then I'll switch over to the IDE.…I'll create a new Script file for this.…
I'll call it "Drive," but the name doesn't matter.…I'll set up a variable called, "folders,"…and set it equal to "DriveApp.getFoldersByName."…And I'll pass in, "photos,"…which is the name of the folder I uploaded.…You'll remember that we can have…more than one object with the same name in Drive.…So, this method returns an object…called a "FolderIterator,"…which is a collection of folders.…There's also a "FileIterator" class…that behaves the same way for files.…
If I wanted access to one particular folder,…I could use the "getFolderById" method.…But, I want to show you how iterators work, in this video.…
First, learn how to use simple scripts to edit documents and spreadsheets, work with files in Drive, and find and send messages in Gmail. Then find out how to add custom functionality to your spreadsheets, and build user interface elements for your scripts, using menus, alerts, and dialogs. Finally, Scott shows how to share your work with others by publishing scripts as web apps.
- What is Google Apps Script?
- Understanding script types
- Logging and debugging your scripts
- Scripting common tasks
- Building custom spreadsheet functions
- Creating add-on functionality such as dialogs and sidebars
- Sharing your script as a web app
Skill Level Beginner
Q: The OpenWeatherMap API is not working, or the call returns a 404. What do I do?
<div>A: OpenWeatherMap now requires you to use a free API key (or APPID) when requesting information. You'll need to register for a free key at <a target="_blank" href="http://home.openweathermap.org/users/sign_up">http://home.openweathermap.org/users/sign_up</a> and then add the APPID parameter and your key to the end of the request URL.</div><div> </div><div>So, your request string "api.openweathermap.org/data/2.5/weather?zip=94040,us" would become "api.openweathermap.org/data/2.5/weather?zip=94040,us&appid=abc123abc123" (using your APPID/API key).</div><div> </div>