@echo off
setlocal enabledelayedexpansion
set "targetFolder=.\"
set "outputFile=output.lst"
cd /d "%targetFolder%"
(for /r %%i in (*.sql) do (
echo %%~fi
)) > "%outputFile%"
echo "文件路径已输出到 %outputFile%"
【bat脚本】读取文件路径并输出
于 2024-03-27 15:35:22 首次发布