For instance, let's say I have a folder with the following in it:
log.batclear.batnew.batinit.exe
Each .bat file calls init once or more times. I do not have access to any of the .bat files, so there is not way that I can pass a variable to init.exe. One thing to know about init is a C# application and can accept arguments.
Possibilities:
- DOSKEYS - Turns out that they don't work for
.batfiles. - Environment Variables - I thought I could name an environment variable called
initthat would do something likeinit %~n0to get the batch file name. Sadly, this doesn't work either. - Hacky Alias - Make a batch file named
init.bat(as the.batfiles callinit, notinit.exe). Then, in theinit.batfile, I would simply putinit.exe %~n0. Two things went wrong with this. First, the.batfiles for some reason tookinit.exepriority overinit.bat, and so the batch file alias wasn't even called. Secondly, the%~n0part expanded toinit, as it was called frominit.bat, not the other batch files.
Am I out of luck? Or is there a hacky method that could work for this?