4

Id like to know if the following is possible as I can't seem to find any concrete way to do it online:

When Google Takeaway service uploads a new takeout-xxx.zip file to my Google Drive Takeaway folder, can a Google Drive script run to automatically extract that zip file and all contents to a folder within my Google Drive account in the cloud?

If possible, if anyone was able to provide some starter code that'd be awesome.

Many thanks

twiz911
  • 634
  • 1
  • 9
  • 18

1 Answers1

1

Yes, you can automatically extract zip file within Google drive by using 'ZIP Extractor'. Using ZIP Extractor you can choose which files in the zip file to extract after extracting the ZIP file, It can read ZIP files from Google Drive and extract their contents into Google Drive.

Here's a Official documentation for Zip Extrator: https://developers.google.com/drive/v3/web/examples/

Link below is a demo app for ZIP Extractor: https://github.com/googledrive/zipextractor

Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30
  • Thanks for the reply. Yes I've tried Zip Extractor. Unfortunately on my Chrome it just sits on " Loading..." spinning forever... – twiz911 Feb 13 '16 at 00:43
  • OK I finally got it to authorise messing around with cookies and browsers. But now it does not list the takeout zip files in the list of zip files within my google drive account, only other zip files. Is there a maximum file size? – twiz911 Feb 13 '16 at 02:03
  • 3
    Also it appears the max file size for Zip Extractor is 50Mb which is far below the multiple GBs my takeout zip files are. – twiz911 Feb 13 '16 at 02:08
  • 2
    **Might as well just use 7zip, RAR, etc.** -- Zip Extractor downloads the file to local computer and then opens it. To see this: From official doc page, pick _"install in drive"_ link, install it. Then open `%temp%` on local machine, sort most recently modified to top. Watch this folder, then open the drive .zip in Zip Extractor. A zero byte `6AA1.tmp` or similar will show up. When download is complete copy to _whatever.zip_ and examine in your usual archive tool. (For the record, 715mb worked here, Aug 2016) – matt wilkie Aug 29 '16 at 02:19