|
Dim Dic As Object
Sub Limonet()
Dim Arr As Variant
Path$ = ThisWorkbook.Path & "\"
Set Dic = CreateObject("scripting.dictionary")
Call AllListFSO(Path)
Arr = Filter(Dic.items(), 1, True)
Range("A2").Resize(1, 2) = Split(Arr(0), "¥")
End Sub
Function AllListFSO(Path) As String
Dim Fld As Object, Fd As Object, F As Object, ObjTable As Object
Set Fld = CreateObject("scripting.filesystemobject").getfolder(Path)
For Each F In Fld.Files
If F.Name Like "*.csv" Then
If Dic.exists(Int(F.DateCreated)) Then
Dic(Int(F.DateCreated)) = 1 + Left(Dic(Int(F.DateCreated)), InStr(Dic(Int(F.DateCreated)), "¥") - 1) & "¥" & F.Path
Else
Dic(Int(F.DateCreated)) = 1 & "¥" & F.Path
End If
End If
Next F
For Each Fd In Fld.subfolders
AllListFSO (Fd.Path)
Next Fd
End Function |
评分
-
1
查看全部评分
-
|