468,512 Members | 1,448 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

How you detect if a directory exist?

Hi everyone
How do you detect if directory exist and if it doesn’t how do you create one
Thank
Ji

Nov 20 '05 #1
4 2981
Imports System.IO

if not Directory.Exists("c:\temp") then
Directory.Create("c:\temp")
end if

Of course, you'll have to add error handling if needed.

"Jim Renton" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Hi everyone,
How do you detect if directory exist and if it doesn't how do you create one? Thanks
Jim

Nov 20 '05 #2
Imports System.IO

if not Directory.Exists("c:\temp") then
Directory.Create("c:\temp")
end if

Of course, you'll have to add error handling if needed.

"Jim Renton" <an*******@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Hi everyone,
How do you detect if directory exist and if it doesn't how do you create one? Thanks
Jim

Nov 20 '05 #3
Thanks Terry
Nov 20 '05 #4
Thanks Terry
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Tee | last post: by
2 posts views Thread by Jim Renton | last post: by
32 posts views Thread by Olivier | last post: by
5 posts views Thread by Edgard Guilherme | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.