Hello
How would I be able to make a variable that holds the value of the directories that exist in the C:\ Simple question to answer...
Thanks
Kevin
Hello
How would I be able to make a variable that holds the value of the directories that exist in the C:\ Simple question to answer...
Thanks
Kevin
The DirectoryInfo class has member functions to do that - GetDirectories in this case.
Imports System.IO Dim fTarget As New IO.DirectoryInfo("C:\") Dim arrAnswer as DirectoryInfo() arrAnswer = fTarget.GetDirectories()
The simplest option is to call GetDirectories on the static type Directory. This can be found in System.Io. It returns a string array of directories that it finds. You can also specify if it should drill down into subcategories when it is called
See msdn for more info http://msdn.microsoft.com/en-us/library/system.io.directory.getdirectories.aspx