Can a Windows batch file determine its invoked filename when invoked through a shortcut?
For example, I create real.bat
, and create its shortcut named phony.bat
(.lnk
?)
And invoke phony
by double-click on it.
Can this batch file detect the name phony.bat
instead of real.bat
?
Of course I can just copy it to another name, but when I edit one of them, I have to manually sync the content to all files.
The question is related to Can a Windows batch file determine its own file name?, but different.