Private Type FILEINFO
    FileName As String
    FileTime As Date
End TypePrivate Sub Command1_Click()    Dim buf As String
    Dim FInfo() As FILEINFO
    Dim count As Integer
    Dim Path As String
    
    Path = "I:\"
    buf = Dir("I:\" & "*.*")
    count = 0
    Do While buf <> ""
        If buf <> "." And buf <> ".." Then
           ReDim Preserve FInfo(count)
           FInfo(count).FileName = buf
           FInfo(count).FileTime = FileDateTime(Path & buf)
           count = count + 1
        End If
        buf = Dir
    Loop
    MsgBox count
End Sub
排序自己写吧

解决方案 »

  1.   

    如果你添加的是list控件,那么你可以打开这个控件的属性栏,其中有一项就是管排序问题的,我记不太清了,你可以去看看!
      

  2.   

    问题主要集中在dir怎么才能取得多个文件?
      

  3.   

    我的程序已经实现了阿:)
    Do While buf <> ""
            If buf <> "." And buf <> ".." Then
               ReDim Preserve FInfo(count)
               FInfo(count).FileName = buf
               FInfo(count).FileTime = FileDateTime(Path & buf)
               count = count + 1
            End If
            buf = Dir
        Loop