Obtenha o lote de caminho padrão
SET mypath=%~dp0
echo %mypath:~0,-1%
Dead Dog
SET mypath=%~dp0
echo %mypath:~0,-1%