if "%run_del%"=="y" set run_del=y && goto _run_other
if "%run_del%"=="N" set run_del=n && goto _run_other
if "%run_del%"=="n" set run_del=n && goto _run_other
echo 输入错误,请重新输入!
goto _run_del
::------------------------------------------------------------------------------------------------
:_run_other
if "%tobat%"=="1" (
echo.
echo 1.一般运行
echo 2.最小化运行
echo 3.最大化运行
echo 4.后台运行
set /p run_other=请选择一个运行方式:
if "!run_other!"=="1" set run_other=1 && goto _run_m
if "!run_other!"=="2" set run_other=2 && goto _run_m
if "!run_other!"=="3" set run_other=3 && goto _run_m
if "!run_other!"=="4" set run_other=0 && goto _run_m
echo 输入错误,请重新输入!
goto _run_other
)
if "%tobat%"=="2" (
echo.
set /p run_other=请输入一个运行的函数名:
goto _run_m
)
if "%tobat%"=="3" (
set run_other="" && goto _run_m
)
::------------------------------------------------------------------------------------------------
:_run_m
echo.
echo 1.不压缩文件
echo 2.低压缩
echo 3.快速压缩
echo 4.标准压缩
echo 5.较好压缩
echo 6.最大压缩
set /p rar_m=请选择一个压缩级别:
if "%rar_m%"=="1" set rar_m=1 && goto _rar_passworld
if "%rar_m%"=="2" set rar_m=2 && goto _rar_passworld
if "%rar_m%"=="3" set rar_m=3 && goto _rar_passworld
if "%rar_m%"=="4" set rar_m=4 && goto _rar_passworld
if "%rar_m%"=="5" set rar_m=5 && goto _rar_passworld
if "%rar_m%"=="6" set rar_m=6 && goto _rar_passworld
echo 输入错误,请重新输入!
goto _run_m
::------------------------------------------------------------------------------------------------
:_rar_passworld
echo.
echo 是否需要密码保护?如果需要请输入密码,如果不需要直接敲回车键:
set /p rar_passworld=
goto root
::------------------------------------------------------------------------------------------------
:root
cls
if not exist %filepath% (
echo 原文件不存在请重新输入
goto start
)
echo 正在准备资源...
::================================
for /f "delims=" %%i in ("%filepath%") do (
set str=%%i
set "str=!str:"=!"
set path_=!str!
for %%j in ("!path_!") do (
set file_path=%%~dpj
pushd %file_path%
)
for %%k in ("!path_!") do (
set temp_=%%~nxk
set file_name=!temp_!
set "temp_=!temp_: =_!"
set new_name=!temp_!
)
)
for /f "delims=" %%i in ("%winrarpath%") do (
set %winrarpath%=%%~si
)
for /f "delims=" %%i in ("%haoyapath%") do (
set %haoyapath%=%%~si
)
::================================
echo %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a %%%%a>%temp_name%.rc
echo cls>>%temp_name%.rc
echo
@echo off>>%temp_name%.rc