How to zip sub-folders as individual folder.zip in COLAB?

Hi guys;

i need your help to zip folders in colab. I am using zip command to make a zip of individual folder but i have got many sub-folders to zip. So whats easiest method to create all sub-folders as individual zip

For example;

i have sub-folders like;
Vol1
Vol2
Vol3
Vol4
… and so on

and i want them to be like this

Vol1
Vol1.zip
Vol2
Vol2.zip
Vol3
Vol3.zip
and so on...

currently im using this command to make a zip for single folder
!zip -r “/content/drive/Shared drives/Name/uploads/100 Volumes of Music/vol1.zip” “/content/drive/Shared drives/Name/uploads/100 Volumes of Music/ Vol. 1/”

2 Likes

plz guys…
help me