-
Does anyone know the sintax for an argument in a batch file?
For example:
If I have a Batch file called MyBatch,and the Batch file has the command to call an exe called MyExe,and MyExe gets one argument: lets say arg1.
If I call the batch file with an argument what is the sintax to pass the argument on to MyExe?
If in VB I have the command: shell ("MyBatch arg"), what is written in the Batch file to call MyExe with arg?
I hope I havent made you crazy.
Thanks.
Dan.
-
I'm not sure, it's been a while since i did batch files
but i guess you put %1 for the first parameter and %2 for the second...
MyExe %1
-
Use %1, %2, etc.. i.e.
Create a Batch file on your desktop using:
Code:
@ECHO You Selected %1
Now drop a file on it.