What path? This is the one you wrote, how do we know your path mate??!
I have changed the code a bit, to what I think its best:
'WRITE CORRECT PATH FILE HERE:
Dim filePath As String = "C:\\Documents and Settings\\Mitchikels\\My Documents\\AVDC\\Downloaded Files"
If System.IO.Directory.Exists(filePath) Then
Dim myDir As New System.IO.DirectoryInfo(filePath)
For Each myFile As System.IO.FileInfo In myDir.GetFiles("*.mp3")
Dim lvwItem As New ListViewItem()
lvwItem.Text(System.IO.Path.GetFileNameWithoutExtension(myFile.FullName))'1st column
lvwItem.SubItems.Add(myFile.Extension)'2nd column
length = ((myFile.Length \ 1024) \ 1024).ToString()'if this lenght variable is type of string!!
'BTW Check for Correction of the math formula!!!
length = [String].Format("0:0.00", lenght)
lvwItem.SubItems.Add(length & " " & sizetext)
Next
End If Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474