If you require all arguments, then you can simply use %* in a batch script. The first item passed is always %1 the second item is always %2 and so on. In the batch script, you can get the value of any argument using a % followed by its numerical position on the command line. But before solving this problem I want to introduce with batch parameter.īatch parameters (Command line parameters): So let’s assume a scenario where you need to pass emp-id and employe name from the command line argument in a batch script. In this article, I will explain how to pass parameters in the batch file script by command line arguments.