如何批量写入第二个命令提示符? [英] How to write to the second command prompt in batch?

查看:162
本文介绍了如何批量写入第二个命令提示符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个批处理代码,可从常规命令提示符运行一个开发人员命令提示符,但是我无法批量写入开发人员命令提示符,因此,我需要帮助.我要完成的是:

1次运行CMD
2-从CMD午餐开发人员命令提示符
3-在开发人员命令提示符下,将目录更改为c:\

那个.如何批量完成此操作?

我尝试过的事情:

我试图查看@if exist是否可以做到这一点,但我仍然遇到问题

I have a batch code that runs a developer command prompt from my regular command prompt but I cann''t write to the developer command prompt in batch therefore, I need help. What I want to accomplish is:

1- run CMD
2- From CMD lunch developer command prompt
3- on the developer command prompt change the directory to c:\

That it. How can I get this done in Batch?

What I have tried:

I was trying to see @if exist will work to do this but I am still having issues

推荐答案

您不知道.

在批处理文件中,没有任何内容可以引用另一个命令提示符.

IIRC唯一的选择是将命令写入另一个批处理文件,然后在命令的命令行中执行该批处理文件,以启动其他命令提示符.
You don''t.

There is nothing that holds a reference to the other command prompt in a batch file.

You''re only option, IIRC, is to write your commands to another batch file and execute that batch file in the command line of the command to launch your other command prompt.


这篇关于如何批量写入第二个命令提示符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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