How can i get the current path in .cmd file?
I see a ton of people saying
oh just use "cd"
To get the value of cd
, I have to set it first, which i can't as i am making it portable.
I wonder if there is any built-in variable which tell the current path of .cmd script file
like:
(C:\test.cmd)
echo %cur-path%
>> C:\
I've been searching for the internet for an hour and I can't find a solution others then "cd", "%cd".
A simple "no" will be acceptable