473,804 Members | 3,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

checking to see if a folder exists

How with out creating a COM object, do you check in .NET to see if a folder
exists? I found the check for a file but i need to check for a folder, and
there does not seem to be on in the path class
Nov 21 '05 #1
2 3392
nevermind im stupid, i completely overlooked the IO.Directory class

"Brian Henry" <sd**@sdf.net > wrote in message
news:u1******** ******@TK2MSFTN GP09.phx.gbl...
How with out creating a COM object, do you check in .NET to see if a
folder exists? I found the check for a file but i need to check for a
folder, and there does not seem to be on in the path class

Nov 21 '05 #2
Own answer by Brian
To prevent everytime opening
Nov 21 '05 #3

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

Similar topics

2
4250
by: Bryan Rasmussen | last post by:
Hi I have a little program that is importing from os.path import exists, join, isdir, normpath, isfile at one point in my program I check if a file exists using if exists("c:\projects"): and that works fine. If I change it to be if exists(thepath):
3
2866
by: Rob Meade | last post by:
Hi all, I am allowing a user to create a directory within my application. I have them entering the name for the directory in a form. When the form is processed I initially check for any special characters that are not allowed (Windows based server incidently), from here I then need to check to see whether the folder name has already been used (either by a previous entry using the application etc, or reserved names as such ie, /images...
0
2862
by: Jeff | last post by:
I am trying to write some C# code that will allow me to determine if the current user running my application has "write" permissions to a particular folder. However, I can't seem to get it to work. In the code snippet I've included below, it always returns "true" whether the folder/file exists or not (let alone whether or not they have permissions). Any ideas? <<< BEGIN CODE SNIPPET >>>
2
6898
by: Argonath | last post by:
Hi, I'm afraid this will no doubt horrendously basic as I'm a complete newbie to VB and have dived in without learning to do much... Start in the deep end and all. So if anyone could help, I'd appreciate it; I've got this bit of code and I couldn't for the life of me tell you why it doesn't work, if anyone else can I'd appreciate it! Cheers
1
1919
by: halcyon943 | last post by:
have 4 folders that I watch and need to move files from to another location. Three constraints: -Finish time. Make sure the program stops transferring files at a specific time -Number of files transferred. Can only move a certain amount of files per time period. -Folders have a priority. The files have to be moved based on the folder priority.
2
2604
by: patelxxx | last post by:
Checking the folder before actually creating the new folder . Can someone guide me in what 'Checks' do I need to do before I create a new folder? I know that one of the checks will be to see if the file already exists or not. What other checks could I do? See coding for Creating new folder use CGI; use strict; use warnings;
2
1151
by: harikakumar | last post by:
i need a code for finding whether a file is exisisting in the folder if exist display the file with some text or not create the file with some text with displaying message that file is created successfully using c# using file dialog plz any one help me
1
1685
by: cosmos22 | last post by:
Hello, I have programmed some coding that copies my .exe to the start up folder, so it will execute on start up. I plan to use this to prompt the user of information, once I can get by this problem: As the .exe file contains info about copying itself to the folder, as it runs on start up, it will attempt to copy again, resulting in an error message. Can anyone suggest some source code that will be included in the .exe that checks to see...
9
2922
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 the text files from the watched folder line by line into variables and then posting them to a SQL table. All of the code for the form is shown below. And it works fine except for 2 issues. First issue: In the Finally of the Try for teh SQL...
0
9704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10558
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9130
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.