Can a Windows batch file determine its own file name?
For example, if I run the batch file C:\\Temp\\myScript.bat, is there a command within myScript.bat that can de
Yes.
Use the special %0 variable to get the path to the current file.
%0
Write %~n0 to get just the filename without the extension.
%~n0
Write %~n0%~x0 to get the filename and extension.
%~n0%~x0
Also possible to write %~nx0 to get the filename and extension.
%~nx0