Rename blobs without needing to copy them
Copying blobs in order to rename them is a heavy operation, especially when the blob is big, or when you need to change many files, such as when changing a directory name.
Our apologies for not updating this ask earlier. Renaming Blobs is on our backlog, but is unlikely to be released in the coming year. Today, you can use the “Copy Blob” API as a workaround.
Using the Azure Files service you can address Azure Storage like a network share using the SMB2.1 protocol. This enables usage of normal Windows API’s to rename files and directories. You can get started with the Files service by visiting https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-how-to-use-files.
For any further questions, or to discuss your specific scenario, send us an email at firstname.lastname@example.org.
copy/remove is okay in quite a few scenario's, but in combination with Media Services it's not viable
Muthusamy A commented
6 years and still there isn't solution for this. I meant, "SOLUTION", not a workaround.
Jeff Walter (jwalter1) commented
It's utterly ridiculous that you guys would put out such a poorly designed feature. Shame on you.
Blob functionality is very weak compared to S3. Missing this kind of functionality is akin to selling someone a car without A/C.
Andy Norris commented
Me, too. Wow. Please.
This would be very useful indeed.
reem dawg commented
is it possible to rename an Azure File Share? How?
Any update from MS?
Eddie Kumar commented
My automation solution overwrites the older files (on nightly basis), we needed to change few files names, this lack of Rename functionality is unfortunate as if I were to rename the file-name at source the automation process will not overwrite the file in Azure File storage (it will duplicate it) which will propagate and affect the further systems where files are transferred (by the automation), this means I will need to change the automation code. Therefore, I'd highly recommend for the Rename feature to be included asap please.
It's definitely bad experience that even we want to swap the folder to .backup but we cannot do it easily.
This is a huge blocker for us and we're likely going to move to another platform because of it. Our organization has 300 TB+ of data in azure blob storage and not being able to perform such a basic file operation makes using this service extremely painful.
Christopher Warrington commented
I would like to be able to rename blobs so I can have them in a different namespace while they are being created/uploaded to. Then, after they are finalized, they can be renamed to their "published" location. Couple this with per-blob expiration and implement atomic rename-and-reset-TTL, then blob upload error recovery becomes trivial: start uploading to a temporary blob with a short TTL, when done, rename-and-reset-TTL to the final name. If anything goes wrong, the partial blob will just go away automatically.
+1, this limitation is slowing down my deployment pipeline. Please add this.
Martin Brandl commented
Until we get a clean solution that don't require to copy and delete a file, You can use my convenience cmdlet: Rename-AzureStorageBlob:
Zeke Victor commented
It's too bad this can't be prioritized. For a folder containing many, many files, a rename not only requires COPY + DELETE but must also be done on an individual file basis instead of at the folder level.
Paul Bergeron commented
In my humble opinion, this is not a "nice to have" but essential to most anyone using this api.
Lawrence Smith commented
Not only is this a forced copy/delete operation, it's not even being done server side. Doing it through Azure Storage Explorer, I can see that I'm egressing/rewriting every file back to the machine that started the folder rename. At least let it be server side!?
It seems pretty clear that there is no plan to allow Blob renaming. What would be nice is the architectural reason why.
Mayank Patel commented
We tried the nextwork share idea but you can not rename the folder instead it copy the contents of folder to new folder. Same behaviour as Azure blob. Any idea when this functionality will be avaialble. It has been four years since original request was made.
you can try "KrojamSoft: BatchRenameFiles Tool". i've used it so many times for this familiar work..