@ECHO OFF SetLocal EnableDelayedExpansion set ARGS= :parse_args if not %1.==. ( set ARG=%1 set ARGS=!ARGS! ^"!ARG:"=\"!^" shift goto :parse_args ) call perl getargs.pl %ARGS%