I am new to
VB, and i have been trying to get a file listing of a report directory, I can get the listing, but it displays
ListView:(Filename).
I pieced together the code from online books and online help, and i removed the ListView References, but it still displays.
Code:
' Populate the ListView.Items property.
' Set the directory to the sample picture directory.
Dim dirInfo As New System.IO.DirectoryInfo("Z:\Development\IaTrack-Beta" & "\xml-reports")
Dim file As System.IO.FileInfo
' Get the html files from the directory
Dim files() As System.IO.FileInfo = dirInfo.GetFiles("*")
' Add each file name and full name including path
' to the ListView.
If Not (files Is Nothing) Then
For Each file In files
Dim item As New ListViewItem(file.Name)
item.SubItems.Add(file.FullName)
lstFiles.Items.Add(item)
Next
End If