[VB6 ] 檔案怎麼照日期時間排序?

看板Visual_Basic作者 (拉傷了 QQ)時間15年前 (2010/09/04 11:38), 編輯推噓0(002)
留言2則, 1人參與, 最新討論串1/1
使用物件 command button 和 list box 我想搜尋檔案後,依照日期和時間排序,請問要怎麼寫呢? 我的程式 Dim p, As String p = Dir("C:\*.*") Do Until p = "" DoEvents List1.AddItem p p = Dir Loop For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then Print List1.List(i) End If Next -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.215.155 ※ 編輯: smallsafe 來自: 123.204.215.155 (09/04 11:40)

09/04 17:17, , 1F
dir()不回傳日期時間資訊,所以你要想別的辦法取得目錄
09/04 17:17, 1F

09/04 17:17, , 2F
可以考慮shell()。
09/04 17:17, 2F
文章代碼(AID): #1CWRz6yH (Visual_Basic)