Move and Copying multiple files to a subdirectory

60 views
Skip to first unread message

ed.g...@gmail.com

unread,
Apr 24, 2012, 8:32:35 AM4/24/12
to gsutil-...@googlegroups.com
Hi,

I'm having trouble using gsutil while working with multiple files. In order to make things a bit easier to manage I want to copy files into a subdirectory of my bucket.

I have a set of files such that:
python gsutil ls gs://mybucket/x*.gz
gs:// mybucket /xaa.gz
gs:// mybucket /xas.gz
gs:// mybucket /xat.gz
gs:// mybucket /xau.gz
gs:// mybucket /xav.gz
gs:// mybucket /xaw.gz

And I want to move those files to:
gs://mybucket/mysubfolder/

I would have thought the gsutil mv command would work, but I get the error:
"CommandException: Destination URI must name a directory, bucket, or bucket subdirectory for the multiple source form of the cp command." 

The command I'm running is:
C:\gsutil>python gsutil mv gs://mybucket/x*.gz gs://mybucket/mysubfolder/

No amount of playing around with the command line seems to be helping unfortunately. I'm using gsutil 3.1 if that helps.

Thanks!
Ed
 
Reply all
Reply to author
Forward
0 new messages