Trying to download multiple files from google cloud storage at times can be frustrating, when there is no option to download all files from bucket. You will have to download one file at a time.
An idea popped in my head to solve this problem.
# The Plan
- Open Cloud shell
- Create a folder and copy all the files from bucket to this folder.
- Zip the folder
- Copy the zip file to Cloud storage
- Download the zip file.
# Code
-
Open Google Cloud Shell and set the GCP project and create a folder
-
Copy all the files from bucket to the folder we are in
-
Zip the folder .
-r
for recursive -
Moving files from shell to bucket
-
Go to cloud storage into the bucket and click on the 3-dots and select download.