十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
@echo off goto start Filename: del_backup.bat Version: V3.0 Author: XAD Blog Site: https://blog.51cto.com/onenice Created Time: 2018/02/13 周二 14:52:58.00 Environment: windows server 2008 :start set file_path=E:\ set file_ext=*.bkf set file_live_time=-15 set file_del_log=D:\del_log.txt echo ============================================================================ >> %file_del_log% echo= >>%file_del_log% echo %date% - %time% [BEGIN] >> %file_del_log% echo= >> %file_del_log% forfiles /p %file_path% /s /d %file_live_time% /m %file_ext% /c "cmd /c echo @path SIZE:@fsize L_C_TIME:@fdate-@ftime >> %file_del_log%" forfiles /p %file_path% /s /d %file_live_time% /m %file_ext% /c "cmd /c del @path" echo= >> %file_del_log% echo %date% - %time% [END] >> %file_del_log% echo= >> %file_del_log%