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

  • Home
  • SEARCH
  • 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 1082943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:22:07+00:00 2026-05-16T22:22:07+00:00

I have a parser function written in my code-behind file, that takes as input

  • 0

I have a parser function written in my code-behind file, that takes as input the filename of a csv file, and parses the data accordingly. In the current scenario, I am supplying the name of the csv file.

In a newer scenario, I would like to scan a particular local directory for csv files, and pass all of them to the parser function one by one.

My current function looks like this:

public List<string[]> parseCSVFile(string path)
{
  ...
}

and I’m calling it like this:

List<string[]> Data = parseCSVFile("C:\\Users\\joysteak\\Documents\\Visual Studio 2008\\WebSites\\Ingy\\data\\results2010.csv");

Any help is much 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-16T22:22:08+00:00Added an answer on May 16, 2026 at 10:22 pm

    I think this is what you’re looking for:

    string[] csvFiles = Directory.GetFiles("C:\\somedirectory", "*.csv");
    
    foreach(string file in csvFiles)
    {
       List<string[]> Data = parseCSVFle(file);
    }
    

    Keep in mind, if you’re doing this in ASP.NET, the work process identity (usually NETWORK SERVICE) will need at least read permissions to the folder you’re wanting to search if it’s outside the web’s root path.

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

Sidebar

Related Questions

I have written a small function, which uses ElementTree to parse xml file,but it
I have a recursion function that parses an object/array with a global variable. If
I have a function that will parse some data coming in. My problem is
I have created a function in PHP that calls a webservice and parses through
I currently have a function that grabs the browser windows uri, parses out the
I have written some physics simulation code in C++ and parsing the input text
Hey everyone, I have written a script that downloads a zip file from a
I have written a function to take in the data from a Sirit IDentity
I have written a little program that parses log files of anywhere between a
I have written some PHP code that will return a value if there are

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.