I'm trying to download all files from a public gdrive folder but with certain filetype restrictions (eg exclude *.avi,*.mkv,*.mp4 etc).

I originally tried with wget since that is what I am familiar with but it seems that wget can only download a single file from gdrive (source). That link also mentions that wget can't download from a gdrive folder due to Google needing authentication before you download (is this still true for a public folder? Full access is available through incognito so I would have thought no authentication is needed.

I see rclone seems to have native support for gdrives, but I have no experience using it. I tried setting it up but couldn't find how to set it up with a remote gdrive which wasn't my own one. I see that it does support excluding files according to filename patters through --exclude stringArray

How would I set it up to pull from a public Google Drive folder? I can't use download-all on gdrive because the entire folder is several TB in size (due to all the video files), I only need the non-video files.

  • Google Drive offers a REST API. You may be able to set up a script that uses curl to invoke the right endpoints. – Haxiel Jan 13 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.