Dim di As New IO.DirectoryInfo("Your directory path")
                    Debug.Print("di: " + di.ToString)
                    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
                        lstFiles.Items.Add(dra) 'all files present in the directory are viewed in list box
                    Next

hope it helps u...

Edited 4 Years Ago by poojavb

Comments
VB.Net solution for VB6 ?

See if this help :

Private Sub ListFiles(strPath As String, Optional Extention As String)
'Leave Extention blank for all files'
    Dim File As String

    If Right$(strPath, 1) <> "\" Then strPath = strPath & "\"

    If Trim$(Extention) = "" Then
        Extention = "*.*"
    ElseIf Left$(Extention, 2) <> "*." Then
        Extention = "*." & Extention
    End If

    File = Dir$(strPath & Extention)
    Do While Len(File)
        List1.AddItem File
        File = Dir$
    Loop
End Sub

Private Sub Command1_Click()
    ListFiles "D:\musicfolder", "*" 
    ' Or ListFiles "D:\musicfolder", "" leave it blank to get all files'
End Sub

See this thread

Comments
Worked nice :)

@poojavb : Than you for replying but i'm using vb6 to do this.
@Jx_Man : Thank you for complete code.

This question has already been answered. Start a new discussion instead.