Get the drive letter from the current directory with:
%cd:~0,2%
%~dp0 is pretty useful in a bat: it is the folder in which the executing bat file resides. For example
set _SCRIPT_DRIVE=%~d0
set _SCRIPT_PATH=%~p0
Get the drive letter from the current directory with:
%cd:~0,2%
%~dp0 is pretty useful in a bat: it is the folder in which the executing bat file resides. For example
set _SCRIPT_DRIVE=%~d0
set _SCRIPT_PATH=%~p0