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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:51:34+00:00 2026-05-28T17:51:34+00:00

I simply have this bit of code. string path = @C:\Program Files (x86)\My App\Sub

  • 0

I simply have this bit of code.

string path = @"C:\Program Files (x86)\My App\Sub Folder of my App\";

if(Directory.Exists(path)) {
   MessageBox.Show("It's here!");
} else {
   MessageBox.Show("Can't find it!");
}

Now the folder does exist and running the command:

explorer "C:\Program Files (x86)\My App\Sub Folder of my App\"

Opens up the window, yet in my code it fails to see the folder. If I had any hair I would be pulling it out.

Any suggestions as to why this is happening?

  • 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-28T17:51:35+00:00Added an answer on May 28, 2026 at 5:51 pm

    Using “@” you don’t need to escape the backslash character (\).

    string path = "C:\\Program Files (x86)\\My App\Sub Folder of my App\\";
    

    My initial answer was incorrect, but I’m keeping the answer as it might be useful to others.

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

Sidebar

Related Questions

I have the following bit of code, simply: $(function() { $('a.add-photos-link').live('click', function(e) { $(this).colorbox({
I have a data that looks like this . And my code below simply
I have no clue how to validate this string. I am simply supplying an
I have a bit of code like this: FileReader fr = new FileReader(file); BufferedReader
I have this small class called City that simply holds some information about a
I have a windows form simply like this: 1) a button when clicked will
I basically have three tables, posts, images and postimages (this simply contains the ids
I have converted this simple method from C# to C++. It reads a path
Ok, firstly I have the following code working.. although my question is this; should
I have to code a Java program that will receive messages from network and

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.