Posted on: 8/26/2014 6:27:04 PM | Views : 358

I use code below to list files in listbox1 but an item "~$0020419.doc" was listing there. I reboot pc but no luck.
Why?
In C:\test\, there are only 3 files: 100020419.doc, 100025818.doc and demo.doc
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click     ' make a reference to a directory     Dim di As New IO.DirectoryInfo("c:\test\")     Dim diar1 As IO.FileInfo() = di.GetFiles()     Dim dra As IO.FileInfo    'list the names of all files in the specified directory     For Each dra In diar1         ListBox1.Items.Add(dra)     Next End Sub

Go to the complete details ...