- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
¦^´_ 8# zz0660
¤£·|¦]¬°¨ä¥LÀɦW¦Ó¶}±Ò¤£¤FÀɮסC
¥Ø«eÓ¤H»{¬°¥i¯à¬OSplit¡A³oÃ䪺°ÝÃD§a?
>> ·s¼W¦p¤U¬õ¦r¡A½Ð¦A´ú¸Õ¡AÁÂÁÂ
Sub test()
Dim Arr(), T$, d$, d1$, d2$, xY$, xM$, xD$
T = Date
Set fs = CreateObject("Scripting.FileSystemObject")
a = "D:\AA\BB\CC\DD"
Set f = fs.GetFolder(a)
Set fc = f.Files
For Each f1 In fc
If UCase(Left(f1.Name, 3)) <> "L-M" Then GoTo 99
d = Split(Split(f1.Name, ")")(1), "-")(0)
xY = Left(d, 4): xM = Mid(d, 5, 2): xD = Right(d, 2)
d1 = DateSerial(xY, xM, xD)
d = Split(Split(Split(f1.Name, ")")(1), "-")(1), ".")(0)
xY = Left(d, 4): xM = Mid(d, 5, 2): xD = Right(d, 2)
d2 = DateSerial(xY, xM, xD)
If T >= d1 And T <= d2 Then
ReDim Preserve Arr(n)
Arr(n) = f1.Path
n = n + 1
End If
99: Next
...
... |
|