:Q
set ARG=!ARG!!c!
set /a i += 1
set c=!CMDLINE:~%i%,1!
if not !c! == !Q! goto :Q
set ARG=!ARG!!Q!
call :exec
set ARG=
set /a i += 1
goto :eof

:NQ
set ARG=!ARG!!c!
set /a i += 1
set c=!CMDLINE:~%i%,1!
if not !c! == !Q! if not !c! == !S! goto :NQ
set ARG="!ARG!"
call :exec
set ARG=
goto :eof

:exec
echo コマンド !ARG!
goto :eof

:pause
pause