:: https://www.robvanderwoude.com/batchphp.php :: Returns the smallest of the numbers specified :: Usage: "Min 4 16 0 -9" returns "-9" @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION IF NOT "%~2"=="" ( FOR %%A IN (%*) DO SET Args=!Args!, %%A PHP -r "print(min(!Args:~2!));" ) ENDLOCAL