bat 获取当前目录名

@echo off
set "lj=%~p0"
set "lj=%lj:\= %"
for %%a in (%lj%) do set wjj=%%a
echo 文件夹是:%wjj%
pause

你可能感兴趣的:(bat)