473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

check folder / directory is exist or not...

i am writing a Console app, it needs user to input a path. the problem is how can i validate the user input path is valid or not?
many thanks..
Kel
Nov 16 '05 #1
1 31017
Try this

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

--
Shak
(Houston)
"kelkel" <ke****@discussions.microsoft.com> wrote in message
news:FF**********************************@microsof t.com...
i am writing a Console app, it needs user to input a path. the problem is how can i validate the user input path is valid or not? many thanks..
Kel

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jenny | last post by:
Hi, I am trying to find a VB way that would create a folder on all existing drives - the folder name would be the same on each drive. ie c:\backup, d:\backup, etc. But the folders would only be...
3
by: build | last post by:
G'day All, I'm using code below to check a path selected by a user. Can anyone pick holes in it please? The more critical you are the better. tia build 'GET SOURCE PATH...
7
by: middletree | last post by:
I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that...
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
2
by: David | last post by:
I'm using following code for checking a file existence. I's working fine for given folder. Is there a way to check a file exitance in subfolders? Thanks in advance, David Option Compare...
1
by: Pmcg | last post by:
Hi, I've been using Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) to get the application data folder for ASP.Net applications using IIS5.0 where it works for both the...
1
by: trialproduct2004 | last post by:
Hi all I am having one application where i want to implement new feature that is 'create new folder'. and display new folder name in listview. My listview is editable. My problem is i want to...
2
by: tatemononai | last post by:
Ok, this is a very unique bug. I have only been able to find one other post related to this online, and everybody who responded misunderstood the problem. I am not trying to reference anything in...
0
by: Rafael Amorim | last post by:
Hello Guys, I have an application that is installed on three different data centers across the world (exactly the same environment and installed files for each one). I got some errors from...
9
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.