1
我想將文件從存儲桶移到同一存儲桶/文件夾。將文件從存儲桶移到另一個存儲桶/文件夾
test
文件夾已經存在。
srcBucket = "tmp"
dstBucket = "tmp"
import boto
c = boto.connect_s3()
src = c.get_bucket(srcBucket)
dst = c.get_bucket(dstBucket)
print dst
for k in src.list():
# copy stuff to your destination here
dst.copy_key(k.key, src.name, "/test/"+k.key)
我越來越:
<Message>The specified key does not
exist.</Message><Key>/test/00hbgelokd2i5nglv6opbte003gorrnahv65uo81</Key>