# 分几个部分

Posted by 帅帅阿柳 on February 22, 1999 at 13:11:56:

In Reply to: 如何抓到硬碟(C:)中所有三十天前的档案,并移到硬碟(D:)中??? posted by PJ on February 22, 1999 at 10:51:08:

1.找出C:碟下所有档案,可以利用Dir的内建函数,包成一个function

Dim strTempFile As String
strTempFile = Dir("C:\*.*", vbNormal)
Do Until strTempFile = ""
'If DateDiff(....)
'End If
strTempFile = Dir
Loop
2. 在上面注解处,插入一些程式码,以检查档案日期(FileDateTime,再用DateDiff看看日期是否差距大于三十日(用"d"参数),再以FileCopy到D:碟.

剩下的部份自个Try吧,查阅On-line Help与动手嚐试可以让你学到更多.Enjoy

Follow Ups:

- 收到!谢谢!Trying..........(无内容) PJ 13:46:22 2/22/99 (0)