0
gsutil mv gs://bucket/gamelists/ gs://bucket/games/

I have folders of media files inside the gamelists and want to rename the folder to games. I did the following command and it did not change anything.

Is there any way that I can just change the main folders?

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
chichi
  • 2,777
  • 6
  • 28
  • 53

1 Answers1

1

As suggested and referred , by Doug Stevenson in the comment above please follow recommendations to prevent the issue. The gsutil mv command allows you to move data between your local file system and the cloud, move data within the cloud, and move data between cloud storage providers.

You can use the gsutil mv command to rename all objects with a given prefix to have a new prefix.

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

If you have a large number of files to move you might want to use the gsutil -m option, to perform a multi-threaded/multi-processing move:

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

Reference Document

Vaidehi Jamankar
  • 1,232
  • 1
  • 2
  • 10