如何通过命令提示符(从文本文件)提供多个命令

时间:2011-05-11 10:10:23

标签: windows batch-file cmd

我想知道是否可以执行命令,例如启动xxxxxxx

其中xxxxxxx来自文本文件,例如,如果文本文件包含:

notepad
calc
putty

以下内容将在cmd中输出:

start notepad
start calc
start putty

任何人都可以让我知道最简单的方法吗

1 个答案:

答案 0 :(得分:2)

如果您的文件名为cmds.lst,则为包含

的批处理文件
for /f %%a in (cmds.lst) do start %%a

应该做的伎俩

相关问题