如何并行运行多个 DOS 命令? [英] How to run multiple DOS commands in parallel?

查看:52
本文介绍了如何并行运行多个 DOS 命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何运行多个dos命令?

How to run multiple dos commands?

我有一个 for 循环,它运行服务器检测以检测哪个服务器工作并且速度快.并且因为有更多的服务器,我不希望按顺序运行所有服务器检测,而是并行运行.

I have a for loop, which runs detection of server to detect which server works and is fast. And because there is more servers, I wish not to run all server detections in sequence, but in parallel.

推荐答案

你可以像这样与 start 并行执行命令:

You can execute commands in parallel with start like this:

start "" ping myserver
start "" nslookup myserver
start "" morecommands

它们都将在自己的命令提示符下启动,并允许您从一个批处理文件同时运行多个命令.

They will each start in their own command prompt and allow you to run multiple commands at the same time from one batch file.

希望这有帮助!

这篇关于如何并行运行多个 DOS 命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆