开发者

How to feed multiple commands (from a text file) through command prompt

I was wondering if its possible to execute a command e.g. start xxxxxxx

where xxx开发者_开发问答xxxx is fed from a text file, so for example if the text file contained:

notepad
calc
putty

The following would be output in cmd:

start notepad
start calc
start putty

Can anyone let me know the easiest way to do this please


If your file is called cmds.lst, a batch file containing

for /f %%a in (cmds.lst) do start %%a

should do the trick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜