How can I skip an argument like %~1
in the %*
?
@echo off
title
cls
:loop
set /p command=
call :command %command%
goto :loop
:command
if "%~1"=="title"(
%~1 %*
)
goto :eof
I'm trying to create my own cmd in there.
But I have a problem: when I try to set my cmd's window title the output is:
title test title
Or when I create an echo
command, the output is:
echo test echo command
That is, the command itself is also inside the output.
Can we skip %~1
in the %*
?
Or should I use any other command?
%*
represents all args no exceptions, you could useshift
to remove an arg from the numbered list and though gain access to former agrs 10 and up.shift /?
or online