0

So in my code I have smth like this

set/p "apk=>> "

And I wanna start my script from run window with apk variable:

myprogram.bat apk_variable_content

Is it possible?

ivan_pozdeev
  • 31,209
  • 16
  • 94
  • 140
  • possible duplicate of [How to pass command line parameters to a batch file?](http://stackoverflow.com/questions/26551/how-to-pass-command-line-parameters-to-a-batch-file) – ivan_pozdeev Feb 08 '15 at 13:08

2 Answers2

0

Put %1 to where you wanna put your parameter - it will pull the first parameter you give it in the command line. %2will take the second one. And so on, until %9

Squirrelkiller
  • 1,881
  • 1
  • 18
  • 34
0
myprogram.bat %apk%

Inside myprogram.bat

echo %1
Mike Nakis
  • 50,434
  • 8
  • 92
  • 124