bat demo和bat调用java获取传入参数

@echo off
echo 当前盘符:%~d0
echo 当前盘符和路径:%~dp0
echo 当前批处理全路径:%~f0
echo 当前盘符和路径的短文件名格式:%~sdp0
echo 当前CMD默认目录:%cd%
set current_path=%cd%
echo  %current_path%


@echo off
rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

java  -jar "E:\androidtool\ApktoolGui v2.0 Final\Bin\apktool.jar" %CMD_LINE_ARGS%

@echo off
if "%PATH_BASE%" == "" set PATH_BASE=%PATH%
set PATH=%CD%;%PATH_BASE%;
java -jar "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9


你可能感兴趣的:(windows命令)