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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:21:35+00:00 2026-05-18T02:21:35+00:00

I have to perform a task and I’ll do my best to detail it.

  • 0

I have to perform a task and I’ll do my best to detail it.

I have 5 folders, for example:

  • Folder A
  • Folder B
  • Folder C
  • Folder D
  • Folder E

In each of these folders is a file. Basically, I need to compare each file against one another (I’ll be calculating a value based upon data within these files.) This needs to be done for every combination (A to B, A to C, A to D, A to E, B to C, B to D, B to E, C to D, C to E, D to E)

Not really sure where to begin with this. Any help is greatly appreciated!

  • 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-18T02:21:36+00:00Added an answer on May 18, 2026 at 2:21 am

    Not sure what your returning value is, but here’s an example of traversing the five folders and appending values to a single string as the final value.
    You can build your own logic upon this.

    string CompareMyFolders()
    {
        string FinalValue = "";
        DirectoryInfo[] folders = new DirectoryInfo[5];
        folders[0] = new DirectoryInfo("C:\\FolderA\\");
        folders[1] = ...;
        folders[2] = ...;
        folders[3] = ...;
        folders[4] = ...;
    
        for(int i = 0; i < folders.Length - 1; i++)
            for(int j = i + 1; j < folders.Length; j++)
                FinalValue += CompareFolders(folders[i], folders[j]);
    
        return FinalValue;
    }
    
    string CompareFolders(DirectoryInfo folder1, DirectoryInfo folder2)
    {
        string value = "";
        // compare the files in both directory
        // append the returning data to the value
    
        return value;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jQuery function already to perform the task I need but is
I have a task I need to perform, do_stuff(opts) , that will take ~1s
I have two JavaScript code snippets. These perform specific task when an 'Update' button
I have to perform a common validation task on each control on a lightswitch
I have a task to perform an HttpWebRequest using Task<WebResponse>.Factory.FromAsync(req.BeginGetRespone, req.EndGetResponse) which can obviously
I have an oddly difficult task to perform. I thought it would be easy,
I have an application which performs 30 independent tasks simultaneously using multithreading, each task
Being forced from NPOI to microsoft interop, I have to perform a task of
I have ruby on rails website,in which I want to perform some task at
I have an application running with the thread,if i perform end-task from the task

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.