471,047 Members | 1,222 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 3047
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 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.