The Google Drive web interface allows you to download a single .zip file if you download a directory. However, I find no way to do that with the API. Is it possible to create a multi file zip on drive with the API?
Jul 25, 2017 - Can I transfer a file from one Google drive to another directly without downloading it? 483 Views How do I select multiple files to download. Here are step-by-step instructions to download a file from Google Drive using the command line API if the file is shared privately and needs authentication. Get the file ID: Go to your Google Drive in your browser. Right-click (or control-click) the file you want to download and click “Get shareable link”. Downloading as zip archive is the default behavior for multiple file download in Google Drive. Select multiple files and/or folders; Right click selection and choose Download. Jun 2, 2018 - This app allows you to one-click download multiple files without zipping in the Google Drive. This is a simple and powerful file downloader for.
Update: Tanakie's code works! This is great! However, I'm only able to get it working in my personal account. I have two G-Suite admin accounts and I get the error:
'Sorry, unable to open the file at this time.
Please check the address and try again.' Music download app without internet.
I have confirmed this works fine in multiple free personal google accounts.Any idea why it will not work when using a paid google account?
------- UPDATE ------
If you get the 'Sorry, unable to open the file at this time' error, wait a day, that error will fix itself.
Here's my final solution only with a POST. Pretty much as Tanaike says below.
Google Script:
php code to call it:
HOWEVER, As in my comment below, this was a useless, futile exercise as Google limits files created by scripts to 10M. I'm off to find a solution that does not depend on Google.. Wish I'd known that before I started.
Tim Duncklee
Tim DunckleeTim Duncklee
1 Answer
How about this workaround?
Unfortunately, there are no APIs for directly creating a zip file from outside in Google APIs. But I think that there is a workaround. There is
zip()
method of Class Utilities in Google Apps Script (GAS). And there is Web Apps as a service for using GAS from outside. I think that what you want to do can be achieved by combining them.Flow :
- Create a GAS script for creating zip files using
zip()
method of Class Utilities. - Deploy the script as Web Apps.
- You can launch the script from outside using GET and POST method of your applications. When you access Web Apps, also you can give some parameters and data.
Reference :
If this was not useful for you, I'm sorry.
Edit :
How about a following sample script? This is a simple sample script for creating a zip file for files in a folder.
- When Google Docs of Spreadsheet, Document and Slide are included in the folder, they are converted to Excel, Word and Powerpont format, respectively.
- When standalone scripts are included in a folder, they are converted to text data.
- Other types (images, text data and so son) are not converted.
These are the same to the web interface.
In order to use this script
Please do the following flow.
- Copy and paste the sample script to the script editor. And save it.
- Deploy Web Apps
- On script editor
- Publish -> Deploy as web app
- At 'Project version', create new version.
- At 'Execute the app as:', select 'Me'.
- At 'Who has access to the app:', select 'Anyone, even anonymous'.
- Click Deploy button.
- On script editor
- Test the Web Apps using curl command as follows.
- If you can get the file ID of created zip file, it means that the script works.
Sample script :
Sample curl command :
Note :
- If you modified the script, please redeploy Web Apps as a new version. By this, the latest script is reflected.
- As a limitation of the sample script, this sample script checks only files in a folder. If you want to retrieve folders in a folder, you can see the sample script here.
- After you got the file ID of created ZIP file, you can download it using Drive API as you know.
![Zipping Zipping](https://i.imgur.com/Nk98I7A.jpg)
If this was useful for you, I'm glad.
Google Drive Download Without Zipping Software
TanaikeTanaike
Not the answer you're looking for? Browse other questions tagged google-drive-apidrive or ask your own question.
I have created an google script which go to my mail and fetch attachments and put it into a folder (shared as anyone with link), and share the link to folder with any given email.But when others open that folder with link it open in google drive viewer(online). Have to open each and every file to download. Is there any way I can let them download whole batch in much more less stressing way?I have tried out creating a folder (lets say folderchild) inside that folder(folderparent) then put all files in folderchild. But still same problem. Have to open that folderchild and open files in there and download them one by one.Zipping attachment is not an option for my solution.Any advices?Thanks in advance.
Lolitha RatnayakeLolitha Ratnayake
6 Answers
If you share a map via Google drive and send the link via email your link has an url of following format:https://drive.google.com/a/FOO/folderview?id=BAR&usp=sharing_eidwhere FOO is the domainname of your organization andBAR is the unique id of the folder (similar to i3AV_u1UsLmTa-dOm22I2XXgioDR8)
Change this url to the followinghttps://drive.google.com/drive/#folders/BAR
Now you can click on the name of the folder and download all files.Note: this is what works today (Jan. '15) in an GAFE (Google Apps For Education) environment.
user906489user906489
They should regress to their own drive, choose the 'Shared with Me' option, tick the required folder and use the 'More' -> 'download' option to download all the content in a zip file
naamanaama
There is OPEN IN DRIVE option in upper right corner, (if you are logged in with your google account). It will put a folder of the same name on your google drive. Then you can right click on the folder and select Download option (zip file will be made and downloaded) :)
Simranjot SinghSimranjot Singh
Google Drive Not Downloading Files
When they're viewing the folder in their Google Drive, don't they have the option to select it, click the 'More' button and pick 'Download'?
https://zoomclever795.weebly.com/massey-ferguson-135-workshop-manual-free-download.html. If not, that seems like a bug on Drive and you should report it in the Drive forum / issue tracker.
Henrique G. AbreuHenrique G. Abreu
Select the file(s) first, I get that option after I select(ed) the files to download ;)
BiblioBiblio
I don't have enough reputation to comment on user906489. His URL works, except in the case when using multiple google accounts and the url should not reference the first account.
In that case just insert
u/USERID/
after https://drive.google.com/drive/
, so thathttps://drive.google.com/drive/#folders/BAR
becomeshttps://drive.google.com/drive/u/USERID/#folders/BAR
where, USERID is the number (greater than zero) of your google account.QeteshQetesh