ilivewithian
ilivewithian

Reputation: 19692

Quick Way to Bluk Copy Azure Blobs

I have about 40,000 blobs in azure storage, they have been given the wrong file extension. They have been uploaded with the filename <name>.png and I need to correct the name to <name>.jpg. In the 1st instance I'd like simply copy the originals into the same blob store but with a new file name.

azcopy would normally be my go to for this kind of thing, but it doesn't seem to have the options I need.

How can I bulk copy and rename files in an azure blob store?

Upvotes: 1

Views: 394

Answers (1)

Zhaoxing Lu
Zhaoxing Lu

Reputation: 6467

Azure Blob Storage doesn't support renaming directly. However, you can work it around by copying the blob to a new blob with modified name (by StartCopy method), and removing the original blob (by Delete method). The copy procedure can be pretty fast if the source and destination is under the same storage account since it's actually a shallow copy.

Upvotes: 1

Related Questions