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
Here is one more way to get this done:
CloudStorageAccount backupStorageAccount = CloudStorageAccount.Parse(blobConectionString);
var backupBlobClient = backupStorageAccount.CreateCloudBlobClient();
var backupContainer = backupBlobClient.GetContainerReference(container);
// useFlatBlobListing is true to ensure loading all files in
// virtual blob sub-folders as a plain list
var list = backupContainer.ListBlobs(useFlatBlobListing: true);
var listOfFileNames = new List();
foreach (var blob in blobs) {
var blobFileName = blob.Uri.Segments.Last();
listOfFileNames.Add(blobFileName);
}
return listOfFileNames;
Source: How to load list of Azure blob files recursively?