删除文件,保留最近多少个文件

@set LogDir=D:\Log

for /f "skip=10" %%i in ('dir %LogDir%\apache-access-*.log /tc /o-d /b') do del %LogDir%\%%i
posted on 2015-08-10 17:47  思静  阅读(188)  评论(0编辑  收藏  举报