Why doesn't this work? Copy multiple images to subdirectory

51 views
Skip to first unread message

shaun...@a-cti.com

unread,
Mar 10, 2012, 7:09:56 PM3/10/12
to gsutil-...@googlegroups.com
 gsutil -h "Cache-Control:public,max-age=604800" cp -R -t -z jpg -a public-read ~/Desktop/images/* gs://new-answerconnect/images

this doesn't work, what did I get wrong? Thanks!


Google Storage Team

unread,
Mar 10, 2012, 7:42:01 PM3/10/12
to gsutil-...@googlegroups.com
Hi Shaun,

I suspect the problem is that the destination URI of a multi-source copy is limited to a bucket (or a local directory) and you've specified a full gs://bucket/object path for your destination URI. When I do that, I get this error message:

> CommandException: Destination URI must name a bucket or directory for the multiple source form of the cp command.

Is that what you're seeing? If so, you'll want to adjust your destination URI. If not, please share more info about the error conditions you're observing.

Thanks,

Marc
Google Cloud Storage Team

Shaun

unread,
Mar 11, 2012, 12:03:09 PM3/11/12
to gsutil-discuss
I think you're right, but the problem is I want to get the intended
effect, ie all the images into the images directory. If I upload them
to their own bucket is there a way to move them later?

Or if that doesn't work, how can one set cache-control, compressions,
etc. on subdirectory items without copying them up one at a time?
Thanks!
Reply all
Reply to author
Forward
0 new messages