Help Explaining %1, %2, etc.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
alleypuppy
Posts: 82
Joined: 24 Apr 2011 19:20

Help Explaining %1, %2, etc.

#1 Post by alleypuppy » 26 Oct 2011 17:23

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!

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

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

#2 Post by Ed Dyreen » 26 Oct 2011 22:57

'

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

alleypuppy
Posts: 82
Joined: 24 Apr 2011 19:20

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

#3 Post by alleypuppy » 27 Oct 2011 16:05

Thank you! I was not aware that the CALL command's help menu had this information.

Post Reply