Im aware that i can get the output this way (to capture both standard and errors):
[batchFilePath] > [logFilePath] 2>&1
Or this way for standard output:
C:\MyBatchFile.bat > output.txt
But is there a way to do this without specifying the location of the batch file itself?
For example lets assume i run (just doubleclick to execute) C:\MyFolder\MyBatch.cmd and after i exit the batch file (or it completes) i can find the output in C:\MyFolder\MyBatch.txt
If so what code would i need to include in the batch file itself?