Resolved My.Computer.FileSystem.GetDirectories removes spaces from folder names returned

Joined
Feb 14, 2021
Messages
6
Programming Experience
1-3
Hey guys,

I have a small VB.net project where I use the loop:

my problem:
For Each foundDirectory As String In My.Computer.FileSystem.GetDirectories(FolderName.)
      ComboBox1.Items.Add(IO.Path.GetFileName(foundDirectory))
Next

It is searching directories with names that have spaces in them (ie: 1 folder)
It gets the correct folder, but like this: (ie: 1folder - no space between 1's char & second char)

What can I do?
 
Back
Top