1.新建一个记事本,输入以下内容: echo off echo 正在执行数据库备份清理及转储,执行完毕自动退出,请勿强制关机!!! rem 删除C:\Users\Public\Nwt\cache\recv目录下的文件及空文件夹 set a=C:\Users\Public\Nwt\cache\recv forfiles /s /p %a% /m *.* /d -90 /c "cmd /c echo @file | del @file" echo %a% for /f "tokens=*" %%a in ('dir /b /ad /s %a% ^|sort /r') do rd "%%a" 2>nul pause rem 本次操作完毕,请验证所有执行结果! 2.然后把新建的记事本,后缀名改为.bat格式,打开就可以运行了 注:set a=C:\Users\Public\Nwt\cache\recv这个为自己路径下的目录 |
|
来自: 桃花源士 > 《window系统技巧》