Not quite sure that I understand your question, but:
The current directory is stored in the pseudo-variable% CD%
Getting the directory where the batch file is located can be done as follows:
%~dp0
% 0 is the name of the batch file. ~ dp gives you the drive and path to the specified argument.
source
share