How to create empty folder in azure blob storage just like empty folder in tool "Azure Explorer"
Technically speaking, you can't have an empty folder in Azure Blob Storage as blob storage has a 2 level hierarchy - blob container and blob. You essentially create an illusion of a folder by prefixing the file name with the folder name you like e.g. assuming you want a style sheet (say site.css) in say css
folder, you name the stylesheet file as css/site.css
.
What some of the tools do is in order to create an empty folder, they create a zero byte blob and prefix it with the name of the folder and then don't show that zero byte blob. If you want, you can do that.
Here's one way to do it with Linux.
az storage blob upload --container-name <container name> --name <folder name> -f /dev/null --account-name <storage account name>
myfolder/
)/dev/null/
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With