Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4596082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:03:53+00:00 2026-05-21T23:03:53+00:00

We currently have a blob storage with thousands of files under the same Azure

  • 0

We currently have a blob storage with thousands of files under the same Azure container. Our file naming convention is something like this:

StorageName\Team\SubTeam\FileName

I’m writing a tool that displays the files for each particular subteam. The code gets the list of blobs for the Container and then for each of those it tries to match to the correct Team\Subteam (see below for sample code).

This works but is extremely slow (because I need to go through all the files to see if they match a particular subteam). Is there some way to improve the speed of the query? I can think of optimizations such as “Find the first file that matches the team you are looking for and then keep track when you find a different team to quit the for early” but that would assume that the BlobList is sorted and wouldn’t fix the worst case scenario.

Unfortunately splitting the files under different containers is not an option at this time.

Here is sample code:

IEnumerable<IListBlobItem> blobs = blobContainer.ListBlobs(
    new BlobRequestOptions() 
    {
        UseFlatBlobListing = true, 
        BlobListingDetails = BlobListingDetails.Metadata 
    }).OfType<CloudBlob>();

foreach (var blob in blobs) {
var cloudy = blob as CloudBlob;

string blobTeamId = cloudy.Uri.Segments[2].Trim('/');
if (blobTeamId != teamId)
        continue;

//Do something interesting with the file
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T23:03:54+00:00Added an answer on May 21, 2026 at 11:03 pm

    1st Solution
    With the REST interface you can pass in

    http://somwhere.com/mycontainername/?restype=container&comp=list&delimiter=/&prefix=\Team\SubTeam
    

    and this will return an xml doc with only the files in the sub team “Folder” (I know its not a folder but it looks like one in the tools)

    You might need to generate a shared access signature to be able to access it you have to tag this on the end of the URL.

    check out here

    Where it shows that you can filter by blobname prefix.

    2nd Solution
    This is probably closer to what you want. If you can use the new storage client that was updated in the azure sdk 1.3 then you can now use

    IEnumerable blobList = client.ListBlobsWithPrefix(“Team/SubTeam”);

    Where Client is an instance of CloudBlobClient.

    EDIT – 18 Nov 2013
    it looks like resttype is no longer supported as a parameter and it should be restype. This seems to have happened quietly over the weekend. I have changed the url example above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF REST service with Azure Blob Storage. I don't want to
Do you know best way to upload too many files to Azure Blob container?
I have setup a blob storage container that is public. I then put the
I have a site that currently uses images on a file server. The images
Currently have a drop down menu that is activated on a hover (from display:none
Currently have password protection on my main and sub directories, however I'd like to
I currently have a XSLT 2.0 Stylesheet that I am trying to remove empty
I currently have a table of concentrations, which are linked to a table of
I currently have one project that currently contains multiple packages. These packages make up
I currently have 4 tables. Product, Category, SubCategory, ProductSubCategory. Category has a OneToMany SubCategory

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.