本帖最后由 pcl_test 于 2016-4-7 00:57 编辑
vbs- Set fso = CreateObject("Scripting.FileSystemObject")
- Set Folder = fso.GetFolder(".") '当前目录,可指定文件夹路径
- DO
- Set Files = Folder.Files
- For Each File In Files
- If File <> WScript.ScriptFullName Then
- n = DateDiff("n", File.DateCreated, now)
- If n >= 1 Then fso.DeleteFile File '删除一分钟前创建的文件
- End If
- Next
- Wscript.Sleep 10000 '10秒检测一次
- Loop
复制代码
|