I want to write a batch file to execute a Cmd command with parameters:
@ECHO OFF
.\someCommand.exe /log verbose.log
If I only provide the log file without a directory, then, for an undetermined reason, the command writes the logfile into some temporary folder.
So if I want to have logging into the file verbose.log
in the same directory the command is in, I would have to call:
.\someCommand.exe /log C:\full\path\to\this\directory\verbose.log
However, that full path changes from system to system, and I want a single batch file that works on all systems (as long as the batch file is in the same directory as the someCommand.exe
). How can I get that path into that command line parameter?