Created
December 18, 2018 20:07
-
-
Save phillypb/ae67b83777a5f11f9a9ca8146688d1c6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function splitUrlFile(Url) { | |
| // remove this line when you incorporate into your script | |
| var Url = 'https://drive.google.com/open?id=1ZvhkehvoL99EmmzUsy481givp31odMaO'; | |
| // split the Url via the equals sign to break into two | |
| var split = Url.split('='); | |
| // the file ID is the second part of the split (first part being zero) | |
| var uploadID = split[1]; | |
| Logger.log('Upload file ID is: ' + uploadID); | |
| // instruct DriveApp to open the file by its ID | |
| var file = DriveApp.getFileById(uploadID); | |
| Logger.log('File is: ' + file); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment