display directory current bat file is located in: echo %~dp0 display current batfile path and name combined echo %~dpnx0