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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:09:32+00:00 2026-06-08T04:09:32+00:00

Im getting this error. Even though i already created a folder CMSExportedData Could not

  • 0

Im getting this error. Even though i already created a folder “CMSExportedData”
Could not find a part of the path ‘C:\CMSExportedData\Sales-20\07\2012.txt’.

Kindly help please

using (FileStream fs = new FileStream("C:\\CMSExportedData\\Sales-" + DateTime.Now.ToString("dd/MM/yyyy") + ".txt", FileMode.Create))
{
    using (StreamWriter sw = new StreamWriter(fs, Encoding.Default))
    {
        //use stream
    }
}
  • 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-08T04:09:34+00:00Added an answer on June 8, 2026 at 4:09 am

    You’re formatting the date as part of the filename in such a way that the date separators are slashes, which get converted to backslashes (path separators) by the path logic:

    ‘C:\CMSExportedData\Sales-20\07\2012.txt’.

    There’s no Sales-20 folder, and no 07 folder.

    Solution: don’t use path separator characters in your file names :). This solution also formats the date as year-month-day because that makes the file names sort in chronological order:

    "C:\\CMSExportedData\\Sales-" + DateTime.Now.ToString("yyyyMMdd") + ".txt"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting this following error even though i am the only person working
I'm getting this error even though I have declared my regex variable. my $pattern
Am getting this error message and matched my brackets and couldn't find anything wrong.
Even though I'm pretty sure I know why this error gets raised, I don't
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Getting this error when try to add an item to my repositories/context: Collection has
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
Keep getting this error after inserting a subdatasheet into a query and trying to
am getting this error when i open my site in internet explorer......... plz help

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.