How can I do this? I tried doing looking in
My.Computer.Filesystem
and
FileIO.Filesystem
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
This will return a String() (string array) of the subdirectories.
Directory.GetDirectories Method
Note that there are 3 overloads for this method. The first one (shown above) simply takes the supplied directory and lists subdirectories.
GetDirectories(path, searchPattern)takes the path and a search pattern (like “my*” – which would list all directories that start with “my”).GetDirectories(path, searchPattern, searchOption)is like the second one, but searchOption indicates whether or not to search subdirectories within the current directory. Values are SearchOption.TopDirectoryOnly or SearchOption.AllDirectories.