01.
Dim
_Dir
As
New
DirectoryInfo(
"C:\Documents and Settings\tom\Desktop\TEST"
)
02.
Dim
_File
As
FileInfo
03.
Dim
_Count
As
Integer
04.
Me
.Text = 0
05.
For
Each
_File
In
_Dir.GetFiles
06.
If
UCase(_File.Name.Split(
"."
)(1)) =
"SLN"
Then
07.
Me
.Text += 1
08.
End
If
09.
_Count += 1
10.
Next
11.
Me
.Text =
"พบไฟล์ SLN จำนวน "
&
Me
.Text &
" โดยมีจำนวนไฟล์ทั้งสิ้น "
& _Count &
" ไฟล์"