Uzyskaj domyślną partię ścieżki

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