I know that %0 contains the full path of the batch script, e.g. c:\\path\\to\\my\\file\\abc.bat
%0
c:\\path\\to\\my\\file\\abc.bat
I would path to be equal to
path
You can use following script to get the path without trailing "\"
for %%i in ("%~dp0.") do SET "mypath=%%~fi"