由于业务需求我需要删除两天前的a,b,c目录下各自的文件夹
根据此脚本加入定时任务执行执行
@echo off
set DaysAgo=2
set LogPath=C:\Users\111\Desktop\test\a
forfiles /p %LogPath% /m * /d -%DaysAgo% -c "cmd /c rd /s /q @FILE"
set LogPath=C:\Users\111\Desktop\test\b
forfiles /p %LogPath% /m * /d -%DaysAgo% -c "cmd /c rd /s /q @FILE"
set LogPath=C:\Users\111\Desktop\test\c
forfiles /p %LogPath% /m * /d -%DaysAgo% -c "cmd /c rd /s /q @FILE"