Skip to content

Instantly share code, notes, and snippets.

@IranthaJ
Created March 4, 2017 06:11
Show Gist options
  • Select an option

  • Save IranthaJ/73f9432c0439da4456772a88d37609b7 to your computer and use it in GitHub Desktop.

Select an option

Save IranthaJ/73f9432c0439da4456772a88d37609b7 to your computer and use it in GitHub Desktop.

Revisions

  1. IranthaJ created this gist Mar 4, 2017.
    11 changes: 11 additions & 0 deletions getFolderID.gs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    function getFolderID(folderName)
    {
    var folders = DriveApp.getFolders();
    while (folders.hasNext()) {
    var folder = folders.next();
    if(folder.getName() == folderName)
    {
    return folder.getId();
    }
    }
    }