@echo off pushd %1 & for %%i in (.) do set curr=%%~ni echo %curr% pause
bat 获取当前文件夹的文件名
原文:https://www.cnblogs.com/ibingshan/p/10907411.html