how can I get just directory names?

  • Thread starter Thread starter Trint Smith
  • Start date Start date
T

Trint Smith

I can get file names with the following code...

Dim di As New DirectoryInfo("c:\OrderData\Database")
Dim fiArr As FileInfo() = di.GetFiles()
Dim f As FileInfo

For Each f In fiArr
Dim fileword As String = (f.Name)
sfw1a.WriteLine(fileword)
txtFileText.Text = (fileword)
Next f
How can I get just directory names in one folder?
thanks,
Trint

.Net programmer
(e-mail address removed)
 
Trint,
Have you tried DirectoryInfo.GetDirectories?
Dim fiArr As FileInfo() = di.GetFiles()

Dim dirs() As DirectoryInfo = di.GetDirectories()

Hope this helps
Jay
 
Back
Top