I use this script to find out the current folder with its .bat file:
for /f %%i in (\"%0\") do set curpath=%%~dpi echo %curpath%
it does
Use This Code
@echo off :: Get the current directory for /f "tokens=* delims=/" %%A in ('cd') do set CURRENT_DIR=%%A echo CURRENT_DIR%%A
(echo this To confirm this code works fine)