- @echo off
- set "path=%path%;C:\Program Files\WinRAR"
- :loop
- for %%i in ("C:\test.log") do (
- if %%~zi gtr 8000000 (
- copy /y "C:\test.log" "C:\test.log.archive"
- type nul > "C:\test.log"
- start WinRAR.exe a -agyyyy-mm-dd_HH-MM-SS -ibck -ep -df "C:\" "C:\test.log.archive"
- )
- )
- timeout /nobreak /t 10 > nul
- goto :loop
复制代码
|