如何批量获取指定文件夹内的所有文件名称?
- 内容介绍
- 文章标签
- 相关推荐
本文共计160个文字,预计阅读时间需要1分钟。
以下是对原文的简化
批量获取指定目录下文件名的核心代码:@echo offset input=set /p input:=echo %input% is inputcd %input%for %%a in (*) do ( echo %%a is input)@echo on
下面是批量获取指定目录下的文件名的核心代码
@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 脚本文件
由上面两个命令就可以写出批量执行一个文件夹下面的所有脚本文件了。
本文共计160个文字,预计阅读时间需要1分钟。
以下是对原文的简化
批量获取指定目录下文件名的核心代码:@echo offset input=set /p input:=echo %input% is inputcd %input%for %%a in (*) do ( echo %%a is input)@echo on
下面是批量获取指定目录下的文件名的核心代码
@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 脚本文件
由上面两个命令就可以写出批量执行一个文件夹下面的所有脚本文件了。

