batch script to set a variable with the current path location
The current directory is in the "shadow" variable cd.
You could try
set "var=%cd%"
%~dp0
This expands into the drive & path of the currently running batch file. I usually surround my batch files with something like:
@echo off
pushd %~dp0
...
popd
Edit: It seems I didn't understand the OP. My example gets the location of the currently running script, not the "Current Directory". +1 to jeb.