既にフォルダが存在しているか、確認する方法を記載します。
Directory.Exists メソッドを使用する方法
Dim sPath As String = "c:\work"
If System.IO.Directory.Exists(sPath) Then
MessageBox.Show("存在します")
Else
MessageBox.Show("存在しません")
End If
FileSystem.DirectoryExists メソッドを使用する方法
Dim sFilePath As String = "C:\work"
If My.Computer.FileSystem.DirectoryExists(sFilePath) Then
MessageBox.Show("存在します")
Else
MessageBox.Show("存在しません")
End If
DirectoryInfo クラスを使用する方法
Dim sFilePath As String = "C:\work"
Dim finfo As New System.IO.DirectoryInfo(sFilePath)
If finfo.Exists() Then
MessageBox.Show("存在します")
Else
MessageBox.Show("存在しません")
End If