DISCO
DISCO

Reputation: 357

How can I move all files from one folder to another? GCP, cloud storage

I need to move exactly all files from one folder in cloud storage to another, how can I do it? I have seen gsutil command, but I cannot find how to move all files.

Upvotes: 1

Views: 1680

Answers (1)

NoCommandLine
NoCommandLine

Reputation: 6298

A folder in a storage bucket is just a prefix (see documentation).

So, what you want to do is change the prefix and according to GCS documentation, what you need is

    gsutil mv gs://my_bucket/oldprefix gs://my_bucket/newprefix

Upvotes: 5

Related Questions