I still didnt get what you mean by open folder. You want to do some processing on folder contents ? Like get Files, directories from particular directory ?
For that you could use the following:
Dim di As IO.DirectoryInfo
'Check if Directory exists, DirectoryNotFound exception will be unhandled otherwise,
'in case directory doesnt exist
If IO.Directory.Exists("C:\Folder") Then
di = New IO.DirectoryInfo("C:\Folder")
End If
'Following code should be inside same If block to avoid possible Null Reference Exception
'Get directories into an Array
Dim directories() As IO.DirectoryInfo = di.GetDirectories()
'Get files into an Array
Dim files() As IO.FileInfo = di.GetFiles()
'Filtered Files
Dim textFiles() As IO.FileInfo = di.GetFiles("*.txt")
'Iterate through directories
For Each Dir As IO.DirectoryInfo In di.GetDirectories
'Do something
MsgBox(Dir.FullName)
Next
Thanks
â™?
My Blog â™?
My Facebook â™?
YOUR Place to have fun time ! â™?
Awesome RPG Action Game