Hi,
I am Populating a combobox from a directory but im wanting to filter some file names from showing in a specific Combobox. Im a newb at this VB stuff and could use the help! Here's the code im using to pull the filenames from my C:\ drive but i need to filter out certain names with the same .ext from that folder to use in the different Comboboxes.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each s As String In System.IO.Directory.GetFiles("C:\backuprouter\")
ComboBox1A.Items.Add(IO.Path.GetFileNameWithoutExtension(s))
ComboBox1B.Items.Add(IO.Path.GetFileNameWithoutExtension(s))
ComboBox2A.Items.Add(IO.Path.GetFileNameWithoutExtension(s))
ComboBox2B.Items.Add(IO.Path.GetFileNameWithoutExtension(s))
Next
End Sub
Thanks for the help