Imports System IO Public Class Form1 Private Sub Button1_Click sender

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Imports System.IO
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
CheckedListBox1.Items.Clear()
Dim FILES As New System.Collections.Specialized.StringCollection
FolderBrowserDialog1.Description = "Выберете папку:"
If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then
For Each file_name As String In Directory.GetFiles(FolderBrowserDialog1.SelectedPath)
FILES.Add(file_name)
Next
End If
For i = 0 To FILES.Count - 1
If IO.Path.GetFileNameWithoutExtension(FILES(i)) >= 0 And IO.Path.GetFileNameWithoutExtension(FILES(i)) <= 10 Then
CheckedListBox1.Items.Add(IO.Path.GetFileNameWithoutExtension(FILES(i)))
End If
Next
End Sub
End Class