I can't rename an existing folder in GCS. How do I do this?
As per the documentation, this should be:
gsutil mv gs://my_bucket/olddir gs://my_bucket/newdir
However, what happens is that olddir
is placed under newdir
, i.e the directory structure is like this (after the call to gsutil mv
):
my_bucket
newdir
olddir
instead of (what I would expect)
my_bucket
newdir
I've tried all four combinations of putting trailing slashes or not, but none of them worked.
gsutil
command when you run it and end up with the unwanted nested folder structure? Normally you would see a Copying... and Removing... line recursively for all the files contained under yourolddir
. – Galleon-m
if you have a lot of files - this way the moving can be done in parallel, meaning much faster. – Permalloy