如何使用.bat文件运行其他.bat(s)并使每个在不同的目录位置的单独的cmd提示符 [英] How to use a .bat file to run other .bat(s) and have each one in a seperate cmd prompt in different directory locations

查看:1013
本文介绍了如何使用.bat文件运行其他.bat(s)并使每个在不同的目录位置的单独的cmd提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    start cmd
    cd /d C:\U\O\D\L\D\M
    call runbot.bat
    cd /d C:\U\O\D\L\F
    call RunBossBot.bat

我的问题是在cmd窗口之间切换,它试图把一切放在一个窗口。
感谢任何帮助,
感谢

My issue is switching between cmd windows, it attempts to put everything in one window. Grateful for any help, Thanks

推荐答案

start "" "c:\somewhere\runbot.bat"
start "" "c:\somewhere\RunBossBot.bat"



启动程序



请参阅 start /?和<$ c

c:\windows\notepad.exe

在批处理文件中,批处理将等待程序退出。当
键入时,命令提示符不等待图形化的
程序退出。

In a batch file the batch will wait for the program to exit. When typed the command prompt does not wait for graphical programs to exit.

如果程序是批处理文件,

If the program is a batch file control is transferred and the rest of the calling batch file is not executed.

start "" c:\windows\notepad.exe

开始启动程序,等待。控制台程序在新窗口中启动。使用/ b开关强制控制台程序进入同一个窗口,这否定了启动的主要目的。

Start starts a program and does not wait. Console programs start in a new window. Using the /b switch forces console programs into the same window, which negates the main purpose of Start.

启动使用Windows图形外壳 - 与键入WinKey + R (运行对话框)。尝试

Start uses the Windows graphical shell - same as typing in WinKey + R (Run dialog). Try

start shell:cache



使用调用命令



调用用于启动批处理文件,并等待它们退出并继续当前批处理文件。

Use Call command

Call is used to start batch files and wait for them to exit and continue the current batch file.

这篇关于如何使用.bat文件运行其他.bat(s)并使每个在不同的目录位置的单独的cmd提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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