I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.
Here's what the command line looks like:
test.cmd admin P@55w0rd > test-log.txt
argumentsbatch-file
I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.
Here's what the command line looks like:
test.cmd admin P@55w0rd > test-log.txt
Best Solution
Another useful tip is to use
%*
to mean "all". For example:When you run:
the above batch file will run:
I may have the syntax slightly wrong, but this is the general idea.