获取当前目录名称
@echo off
set "lj=%~p0"
set "lj=%lj:\= %"
for %%a in (%lj%) do set wjj=%%a
echo %wjj%
pause
----------------------------------------------------------
获取当前路径
@echo off
echo %cd%
pause
获取当前目录名称
@echo off
set "lj=%~p0"
set "lj=%lj:\= %"
for %%a in (%lj%) do set wjj=%%a
echo %wjj%
pause
----------------------------------------------------------
获取当前路径
@echo off
echo %cd%
pause