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
  • 33,874
  • 19
  • 107
  • 152
  • 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
  • 2,575
  • 1
  • 22
  • 41
0
myprogram.bat %apk%

Inside myprogram.bat

echo %1
Mike Nakis
  • 56,297
  • 11
  • 110
  • 142