batch path -site:medium.com -site:towardsdatascience.com code example Example: get the default path batch SET mypath=%~dp0 echo %mypath:~0,-1%