本帖最后由 77七 于 2024-12-24 15:34 编辑
- @echo off
- set infolder=d:\a
- set outfolder=d:\b
- path C:\Program Files\WinRAR;%path%
-
- for /f "delims=" %%i in ('dir /b "%infolder%\*"') do (
- if exist "%infolder%\%%i\" (
- rar a -v1g "%outfolder%\%%~nxi" -ep1 -m0 "%infolder%\%%i"
- ) else (
- rar a -v1g "%outfolder%\%%~ni" -ep1 -m0 "%infolder%\%%i"
- )
- )
- pause
复制代码
|