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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:05:40+00:00 2026-06-06T19:05:40+00:00

I have an exe that already creates a csv file. If I save the

  • 0

I have an exe that already creates a csv file. If I save the exe in C:/EXE, then the cvs file automatically gets created in C:/EXE folder.
C# code uses StreamWriter to accomplish this:

using (TextWriter log = new StreamWriter(errorLog + errorBatchNumber.ToString("000") + ".csv", true))
{
    if (errorCount == 0)
    {
        log.WriteLine("Error message");
    }
    log.WriteLine(link.StatusMessage);
    log.Close();
}

What I need to add:

  1. A folder needs to be created first where the csv file will be saved.
  2. This folder will be created where the EXE was saved, in this example: C:/EXE
  3. After folder and cvs file was created, it needs to be zipped thru code. (But I need to accomplish first 1 and 2)

Any ideas?
Thanks in advance guys! 🙂

  • 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-06T19:05:41+00:00Added an answer on June 6, 2026 at 7:05 pm

    If you know the path where the EXE will be saved then

    1. Directory.CreateDirectory(path + folderName) to create folder
    2. To zip items use SharpZipLib at
      http://www.icsharpcode.net/opensource/sharpziplib/ or http://wiki.sharpdevelop.net/SharpZipLib_MainPage.ashx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a folder that will contain a temporary file that will be created
We have a setup project that produces an uncompressed MSI file and no Setup.exe
We have a netbeans-platform application, that creates a custom runnable .exe with the default
I have a wix installer that will install an XML file and then modify
I have an EXE that I want to distribute, but I don't want to
I have an exe that is built and placed into a Setup project for
I have a simple .exe that needs to be running continuously. Unfortunately, sometimes it
I have a C# exe that needs to be run using WMI and access
I have a Delphi exe that is built with packages. The exe processes successfully
I have a setup.exe project that I run with the following command-line arguments to

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.