bat 批量提取指定目录下的文件

如下是批量获取指定目录下的文件名。

@echo off
echo text input

set input=
set /p input=:
echo %input% is input
cd %input%
rem @echo on
for  %%a in (*) do (
    echo %%a is input
)

cd ..

如下是sql server执行对应脚本文件

sqlcmd -Spcserver -dmaster -Usa -PcrexPT84B -i脚本文件

由上面两个命令就可以写出批量执行一个文件夹下面的所有脚本文件了。

原文地址:https://www.cnblogs.com/Purk/p/6907274.html