Page 1 of 1

Help Explaining %1, %2, etc.

Posted: 26 Oct 2011 17:23
by alleypuppy
Hello,

I am curious about what the variables %1-%9 mean/do in a batch file. I understand that %0 is the name of the file, but that's about it.

Thanks for any help!

Re: Help Explaining %1, %2, etc.

Posted: 26 Oct 2011 22:57
by Ed Dyreen
'

Code: Select all

@echo off

call :help me please ^!
pause
exit /b 0

:help ()
::(
  echo.%*
  echo.%0 %1 %2 %3
  echo.
  call /? |more
::)
exit /b 0

Re: Help Explaining %1, %2, etc.

Posted: 27 Oct 2011 16:05
by alleypuppy
Thank you! I was not aware that the CALL command's help menu had this information.