I actually would've just posted this as a comment under @Wikunia's brilliant colab answer, here, but I'm new (sorry!!):

Basically, that works, and it works perfectly, but I'd like to genericise it to run on all zip files in a folder. So, basically the equivalent of a * in Windows.

Here's @Wikunia's answer in full:

You can connect to your gdrive using:

from google.colab import drive

and then

!unzip -uq "drive/My Drive/PATH_TO_ZIP" -d "drive/My Drive/PATH_TO_OUTPUT"

Here uq is only used to update and be quite (quite because massive output is sometimes causing a crash in the Google Colab Notebook.

I've tried a few things that I thought might work as wildcards (*'s and _'s for two ...), but this is literally the first time I've used Python, I tried to google, but it's entirely not clear how to google for this.

Totally understand if this is a no can do, or if I've somehow not done things properly. I tried to tag colab and python, but no can do. Please feel free to correct my style or something. If you possibly can, please be kind.

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.