Obtenga el lote de ruta predeterminado

SET mypath=%~dp0
echo %mypath:~0,-1%
Dead Dog