I have a container named "pictures", and have some folders named "Folder1", "Folder2" inside of it. So files of my blob will be addressed like this "http://optimus.blob.core.windows.net/pictures/Folder1/IMG123.png". Using the below C# code to delete the files inside folders,
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(*AzureConnectionString*);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("pictures");
var blobs = container.ListBlobs("Folder1", true);
foreach (var blob in blobs)
{
container.GetBlockBlobReference(((CloudBlockBlob)blob).Name).DeleteIfExists();
}
after deleting all those files in "Folder1" it will be empty. I m trying to delete the empty folder, but can't get a way to do it. Is it possible to delete the folder(s)? Any help will be much appreciated. Thanks in advance.