查看全部评分
举报
; 显示当前目录中所有文件的文件名 $search = FileFindFirstFile("*.*") ; 检查搜索是否成功 If $search = -1 Then MsgBox(0, "错误", "没有文件/目录 匹配搜索") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop MsgBox(4096, "文件:", $file) WEnd ; 关闭搜索句柄 FileClose($search)
While 1 $search = FileFindFirstFile($netpath & @YEAR & "*.*") If $search = -1 Then Else While 1 $c1 = FileFindNextFile($search) If @error Then ExitLoop $c2 = @YEAR & @MON & @MDAY & @HOUR $c2 = $c2 - $c1 ;MsgBox(4096, "文件:", $file &"数据:"& $c2) If $c2 > 18 Then DirRemove($netpath & $file, 1) WEnd EndIf FileClose($search) WEnd
#include <File.au3> Local $netpath = @ScriptDir & '\' $a = _FileListToArray($netpath, @YEAR & '*.*', 2) If Not @error And $a[0] > 9 Then For $i = 1 To $a[0] - 9 DirRemove($netpath & $a[$i], 1) Next EndIf
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2026-6-7 06:02 , Processed in 0.080349 second(s), 27 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2026 Discuz! Team.