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 8676547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:13:29+00:00 2026-06-12T20:13:29+00:00

I need to compare from a list that I have to the files in

  • 0

I need to compare from a list that I have to the files in a blob storage of azure, the only part I need is a way to get a list of the files in that blob.

For example

blob azureImages
files:
name
something.jpg
asd.jpg
iwda.jpg
my list:
name
something.jpg
asd.jpg

When I compare the files from the blob with my list, I’d like to delete the files that have no match in my list.

  • 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-06-12T20:13:30+00:00Added an answer on June 12, 2026 at 8:13 pm

    You can get a list of blobs in a container with CloudBlobContainer.ListBlobs() or inside a directory with CloudBlobDirectory.ListBlobs()

    CloudBlobClient blobClient = new CloudBlobClient(blobEndpoint, new StorageCredentialsAccountAndKey(accountName, accountKey));
    
    //Get a reference to the container.
    CloudBlobContainer container = blobClient.GetContainerReference("container");
    
    //List blobs and directories in this container
    var blobs = container.ListBlobs();
    
    foreach (var blobItem in blobs)
    {
        Console.WriteLine(blobItem.Uri);
    }
    

    You’ll need to parse the file name from blobItem.Uri, but then you can use LINQ’s Except() method to find the difference:

    public string FindFilesToDelete(IEnumerable<string> fromAzure, IEnumerable<string> yourList)
    {
         return fromAzure.Except(yourList);
    }
    

    which will return everything in the fromAzure list that isn’t in yourList.

    And lastly you can delete the blobs with this example

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

Sidebar

Related Questions

I have two long list, one from a log file that contains lines formatted
I have two documents with a simple schema that I need to compare: current
Basically I have a directory of DWG files stored in a List that I
ive got a list of urls that have been put together from several sources,
I need to compare a key object from a div to a string. I
I need to compare two bitmaps. One bitmap is loaded from a file, the
I need to compare two lists where each list contains about 60,000 objects. what
In some library code, I have a List that can contain 50,000 items or
We have two mailing lists that we need to combine, and then make sure
I need to compare a 1-dimensional array, in that I need to compare each

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.