?
Solved

I need to check for whether the file folder is created in successfully in C#. How to?

Posted on 2011-10-03
4
Medium Priority
?
368 Views
Last Modified: 2012-05-12
Hi there;

I need to check for whether the file folder is created in successfully in C#.

I mean i need to have a function whether the file is created successfully, return true or return false.

Same for different function checking for folder creation.

Kind regards.
0
Comment
Question by:jazzIIIlove
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
plusone3055 earned 2000 total points
ID: 36903664
http://bytes.com/topic/c-sharp/answers/249872-check-folder-directory-exist-not

bool exists = System.IO.Directory.Exists(@"c:\myPath");
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36903945
I want to check not the exist case.

I just want to create a directory and if the creation fails or not.

Kind regards.
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 36903956
after the  create process run the code i gave you checking if exist will prove whether it was created successfully or not :)
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 36905353
Ehm. You are right.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question