android - Batch script not running just stops at cd of folder when trying to modify multiplue files -


i have script in main script section not function correctly

you can download full thing here changes working on , cant seemt work when in theory should

http://apkmultitool.com/downloads/apk-multi-tool-test-build.zip

  cls echo weclome batch optimization menu echo have 1 of 3 options echo 1 batch zipalign echo 2 batch optomize png files echo 3 batch optomize png files zipalign apk files afterword. set /p input=type input 1 - 3: %=% if (%input%)==1 goto zipo if (%input%)==2 goto ponly if (%input%)==3 goto zipb  :zipo %%f in (place-apk-here-to-batch-optimize\*.apk) (call :zipoa "%%f") :zipoa if %1 == () goto zipob cd other start "starting batch zipalign of apk files" batchzip01 goto restart :zipob echo folder empty please place files inside , try again pause goto restart :ponly %%f in (place-apk-here-to-batch-optimize\*.apk) (call :ponlya "%%f") :ponlya if %1 == () goto ponlyb cd other start "starting batch optomize of png files" batchopt01 goto restart :ponlyb echo folder empty please place files inside , try again pause goto restart :zipb %%f in (place-apk-here-to-batch-optimize\*.apk) (call :zipba "%%f") :zipba if %1 == () goto zipbb cd other start "starting batch optomize of png files zipalign of apk files " batchopt02 goto restart :zipbb echo folder empty please place files inside , try again pause goto restart 

but when try run of 3 option hang example when run option run both roptipng , zipalign sit there after cding folder

batchopt01.bat

@echo off  cd ../place-apk-here-to-batch-optimize %%f in (*.apk) (call :optipng "%%f")  :optipng if %1 == () goto end  :: makes working folders md "..\optimized" md "%~dp0untouched" md "%~dp0apkopt_temp_%~n1"   :: uncompressing contents of apks "%~dp07za.exe" x -o"%~dp0apkopt_temp_%~n1" %1  :: moves 9.png files seperate folder before optomizing normale png files mkdir "%~dp0temp" xcopy "apkopt_temp_%~n1\res\*.9.png" "%~dp0temp" /s /y  :: -o* (0-99) specifies how image optimized "%~dp0roptipng.exe" -o99 "%~dp0apkopt_temp_%~n1\**\*.png" xcopy "%~dp0temp" "%~dp0apkopt_temp_%~n1\res" /s /y rmdir "%~dp0temp" /s /q copy /b %1 "..\untouched" del /q %1  :: -mx%usrc% (0-9) indicates compression level used working apks "%~dp07za.exe" -tzip "..\optimized\%~n1.apk" "%~dp0apkopt_temp_%~n1\*" -mx%usrc% -mmt rd /s /q "%~dp0apkopt_temp_%~n1"  :end echo batch optomize of png files completed. paused  exit 

batchopt02.bat

@echo off cd ../place-apk-here-to-batch-optimize %%f in (*.apk) (call :optipng "%%f")  :optipng if %1 == () goto end  :: makes working folders md "..\optimized" md "%~dp0untouched" md "%~dp0apkopt_temp_%~n1"   :: uncompressing contents of apks "%~dp07za.exe" x -o"%~dp0apkopt_temp_%~n1" %1  :: moves 9.png files seperate folder before optomizing normale png files mkdir "%~dp0temp" xcopy "%~dp0apkopt_temp_%~n1\res\*.9.png" "%~dp0temp" /s /y  :: -o* (0-99) specifies how image optimized "%~dp0roptipng.exe" -o99 "%~dp0apkopt_temp_%~n1\**\*.png" xcopy "%~dp0temp" "%~dp0apkopt_temp_%~n1\res" /s /y rmdir "temp" /s /q copy /b %1 "%~dp0untouched" del /q %1  :: -mx%usrc% (0-9) indicates compression level used working apks %~dp07za.exe" -tzip "..\optimized\%~n1.apk" "%~dp0apkopt_temp_%~n1\*" -mx%usrc% -mmt rd /s /q "%~dp0apkopt_temp_%~n1"  :end echo batch optomize of png files completed beginig zipalign functions. cd "%~dp0" start "starting batch zipalign of apk files" batchzip02  exit 

batchzip01.bat

@echo off cd ../place-apk-here-to-batch-optimize %%f in ("*.apk) (call :zipalign "%%f")  :zipalign if %1 == () goto end  :: makes working folder md "../zipaligned"  :: -zipalign -v * (4) indicates amount of bytes used optimize apks "%~dp0zipalign.exe" -v 4 "%~n1.apk" "../zipaligned\%~n1.apk" del /q %1  :end exit 

batchzip02.bat

@echo off cd ../optimized %%f in ("*.apk) (call :zipalign "%%f")  :zipalign if %1 == () goto end  :: makes working folder md "..\zipaligned"  :: -zipalign -v * (4) indicates amount of bytes used optimize apks "%~dp0zipalign.exe" -v 4 "%~n1.apk" "..\zipaligned\%~n1.apk" del /q %1  :end exit 

in scripts, replace start commands call. ditch comments.

start "starting batch zipalign of apk files" batchzip01 

becomes

call batchzip01 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -