title: How to get a list of all folders in an container in Blob Storage?
body: <p>I am using Azure Blob Storage to store some of my files away. I have them categorized in different folders. </p>
  
  <p>So far I can get a list of all blobs in the container using this:</p>
  
  <pre><code>    public async Task&lt;List&lt;Uri&gt;&gt; GetFullBlobsAsync()
      {
          var blobList = await Container.ListBlobsSegmentedAsync(string.Empty, true, BlobListingDetails.None, int.MaxValue, null, null, null);
  
          return (from blob in blobList.Results where !blob.Uri.Segments.LastOrDefault().EndsWith("-thumb") select blob.Uri).ToList();
      }
  </code></pre>
  
  <p>But how can I only get the folders, and then maybe the files in that specific subdirectory?</p>
  
  <p>This is on ASP.NET Core btw</p>
  
  <p>EDIT:</p>
  
  <p>Container structure looks like this:</p>
  
  <pre><code>Container  
  |  
  |  
  ____Folder 1  
  |   ____File 1  
  |   ____File 2  
  |   
  |  
  ____Folder 2   
      ____File 3  
      ____File 4  
      ____File 5  
      ____File 6  
  </code></pre>