Deleting files in Azure Blob Storage with Azure CLI

Standard
azure login
azure storage account list
azure storage account set YourAccountName
export AZURE_STORAGE_CONNECTION_STRING='DefaultEndpointsProtocol=https;AccountName=YourAccountName;AccountKey=myDSCnRVxxxxxNCwcFkkxxxxxx4nbhV10unY2yFRHNGb8VHZLjg77F9WA=='
azure storage container show YourContainer
azure storage container set YourContainer
azure storage blob show YourContainer BlobName
azure storage blob delete YourContainer BlobName

You can address a blob in your storage account using the following URL format:
http://storage-account-name.blob.core.windows.net/container-name/blob-name

For example, here is a URL that addresses one of the blobs in the diagram above:
http://sally.blob.core.windows.net/movies/MOV1.AVI

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.