- @echo off
- set "MyFolder=C:\test\aaa"
- :loop
- if exist "%MyFolder%\" (
- for /f "delims=" %%a in ('dir /a /b "%MyFolder%"') do (
- timeout /nobreak /t 120 >nul
- del /f /q "%MyFolder%\*.*"
- )
- timeout /nobreak /t 2 >nul
- goto :loop
- ) else (
- echo 文件夹不存在
- pause
- )
复制代码
|