文件夹要和文件在同一路径中,在该路径下新建一个文本文档,将代码粘贴进去,另存为.bat文件,点击运行即可。 for %%i in (*.xls) do (move "%%i" "%%~ni")for %%i in (*.xlsx) do (move "%%i" "%%~ni")pause