I need to list names of Azure Blob file names. Currently I m able to list all files with URL but I just need list of names. I want to avoid parsing names. Can you please see my below code and guide:
CloudStorageAccount backupStorageAccount = CloudStorageAccount.Parse(blobConectionString); var backupBlobClient = backupStorageAccount.CreateCloudBlobClient(); var backupContainer = backupBlobClient.GetContainerReference(container); var list = backupContainer.ListBlobs();
The List Blobs operation returns a list of the blobs under the specified container.
If you're using Windows Azure Storage 4.3.0, try this code.
List<string> blobNames = list.OfType<CloudBlockBlob>().Select(b => b.Name).ToList();
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