回复 7# netdzb
你的意思说 把游戏移到新的游戏根目录后 重新把游戏按一个文件夹目录打包成游戏包对吧
我以前自己写了个打包 漫画的批处理
应该可以
:winrar- echo.&echo.&echo.批量打包当前目录下各个文件夹并删除&echo.&echo 请将批量打包当前目录文件夹拖入本窗口: &set/p paths=
-
- ::获取待复制文件夹名称和获取无双引号后的目录变量 winrar程序路径
- for /f "usebackq delims=" %%i in ('%paths%') do set "folder=%%~nxi"
- for /f "usebackq delims=" %%a in ('%paths%') do set "paths=%%~a"
- set RarPath=C:\Program Files\WINRAR\winRAR.EXE
-
- for /l %%i in (1,1,1) do echo %%i>nul
-
- for /f "usebackq delims=" %%I in (`dir /ad/b/s/on "%paths%\*.*"`) do (
- "%RarPath%" a -m5 -r -ep1 -inul -y -o+ -ibck "%%I.rar" "%%I\*.*"
- rd /q /s "%%I"
- )
-
- exit
复制代码 7z版本的:- @echo off&mode con: cols=42 lines=15&PUSHD %~dp0
-
- set Titlietool=压缩文件批量解压/压缩
- title %Titlietool%
- :SetPath
- color 2F
- cls
- echo.&echo.&echo.&echo 批量解压/压缩目录文件夹拖入本窗口: &set/p paths=
- ::获取待复制文件夹名称和获取无双引号后的目录变量 winrar程序路径
- for /f "usebackq delims=" %%i in ('%paths%') do set "folder=%%~nxi"
- for /f "usebackq delims=" %%a in ('%paths%') do set "paths=%%~a"
-
- :MENU
- color 2F
- cls
- echo.&echo.
- echo. 1. 解压文件目录下压缩文件
- echo.
- echo. 2. 压缩文件目录下压缩文件
- echo.
- echo. 3. 重新选择目录
- echo.&echo.&echo.
-
- SET Choice=
- SET /P Choice=请选择要进行的操作(1,2,Q),再按回车:
- IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
- IF /I '%Choice:~0,1%'=='1' GOTO UnPacked
- IF /I '%Choice:~0,1%'=='2' GOTO Packed
- IF /I '%Choice:~0,1%'=='3' GOTO SetPath
- IF /I '%Choice:~0,1%'=='Q' exi
- echo.&color 4f&echo 请勿乱输入!!!任意键继续...&PAUSE >NUL &goto MENU
-
-
-
- :UnPacked
- for %%a in (zip rar 7z) do (
- for /f "usebackq delims=" %%I in (`dir /b/s/on/a:-d "%paths%\*.%%a"`) do (
- rem echo.%%~nxI&echo.%%~nI&pause>nul
- IF not exist "%paths%\%%~nI\" md "%paths%\%%~nI"
- "%~dp07z\7z" x -y "%%I" "-o%paths%\%%~nI") >nul 2>nul
- )
- echo.解压完毕!
- for /l %%i in (1,1,1000) do echo %%i>nul
- goto menu
-
- :Packed
- for /f "usebackq delims=" %%I in (`dir /ad/b/on "%paths%\*"`) do (
- rem echo.%%I&pause>nul
- "%~dp07z\7z" a -t7z -r -mx=9 -m0=LZMA2 -ms=10m -mf=on -mhc=on -mmt=on "%paths%\%%~nxI.7z" "%paths%\%%~nxI"
- rd /q/s "%paths%\%%~nI"
- )
- echo.压缩完毕!
- for /l %%i in (1,1,1000) do echo %%i>nul
- goto menu
-
-
-
- rem >nul 2>nul
- exit
复制代码
|