Make The Previous Post A Mass APK Installer That Does Not Uses ADB Install-Multi Syntax

Posted at

@echo off

:loop
      ::-------------------------- has argument ?
if ["%~1"]==[""] (
echo done.
goto end
)
      ::-------------------------- argument exist ?
if not exist %~s1 (
echo error "%~1" does not exist in file-system.
) else (
echo "%~1" exist
if exist %~s1\\NUL (
echo "%~1" is a directory
) else (
echo "%~1" is a file! - time to install:
call adb install %~s1
)
)
      ::--------------------------
shift
goto loop


:end

pause

::: ##########################################################################
::: ## ##
::: ## 0. run: adb devices - to start the deamon and list your device ##
::: ## ##
::: ## 1. drag&drop ANY amount of files (APK) over this batch files, ##
::: ## ##
::: ## - it will install them one by one. ##
::: ## - it just checks if file exists. ##
::: ## - it does not checks if it is a valid APK package ##
::: ## - it does not checks if package-already-installed ##
::: ## - if there is an error you can always press [CTRL]+[C] ##
::: ## to stop the script, and continue from the next one, ##
::: ## some other time. ##
::: ## - the file is copied as DOS's 8.3 naming to you ##
::: ## don't need to worry about wrapping file names or renaming ##
::: ## them, just drag&drop them over this batch. ##
::: ## ##
::: ## Elad Karako 1/1/2016 ##
::: ## https://icompile.eladkarako.com ##
::: ##########################################################################

also posted on StackOverflow