Path Exists / Create Path

  • Thread starter Thread starter David Schwartz
  • Start date Start date
D

David Schwartz

How can you tell if a Path exists? Is there a simple way to create a Path
if it doesn't exist?

Thanks!
 
David Schwartz said:
How can you tell if a Path exists? Is there a simple way to create a
Path if it doesn't exist?

System.IO.Directory.Exists
System.IO.Directory.CreateDirectory
 
Try this sample.

Dim di As New System.IO.DirectoryInfo(txtPath.text)

If Not di.Exists Then

di.Create()

End If
 
How can you tell if a Path exists? Is there a simple way to create a Path
if it doesn't exist?

Thanks!

System.IO.Directory.Exists
System.IO.File.Exists

To create them...

System.IO.Directory.Create
System.IO.File.Create

HTH,
Tom Shelton
 
Back
Top