Getting the location of the .bat file from the inside

I am writing a .batscript for Windows. Is there any command that I can use in a script to extract the directory where the script is located?

+3
source share
2 answers

from: http://ss64.com/nt/cd.html

In a batch file to display the location of the batch script file (% 0)

ECHO "% ~ dp0"

+3
source

echo% CD%

must work

-1
source

Source: https://habr.com/ru/post/1747344/


All Articles