@echo off
echo 当前盘符:%~d0
echo 当前盘符和路径:%~dp0
echo 当前盘符和路径的短文件名格式:%~sdp0
echo 当前批处理全路径:%~f0
echo 当前CMD默认目录:%cd%
pause
Copy the above code and save it as xx.bat Double-click to execute to view the effect
{{o.name}}
{{m.name}}
@echo off
echo 当前盘符:%~d0
echo 当前盘符和路径:%~dp0
echo 当前盘符和路径的短文件名格式:%~sdp0
echo 当前批处理全路径:%~f0
echo 当前CMD默认目录:%cd%
pause
Copy the above code and save it as xx.bat Double-click to execute to view the effect