本帖最后由 apang 于 2012-5-29 14:07 编辑
- @echo off
- if "%~1"=="" goto :eof
- if exist "%~1\" (
- for /f "delims=" %%a in ('dir /a-d /b /s "%~1\*.gzo"') do (
- if %%~za gtr 5120 (ren "%%~a" "%%~na.rar"
- ) else ren "%%~a" "%%~na.txt"
- )
- ) else (
- for %%a in (%*) do (
- if %%~za gtr 5120 (ren "%%~dpna.gzo" "%%~na.rar"
- ) else ren "%%~dpna.gzo" "%%~na.txt"
- )
- )
复制代码
|