更改批处理文件时,它的运行 [英] Changing a batch file when its running

查看:101
本文介绍了更改批处理文件时,它的运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行一个长期运行的批处理文件。我现在意识到,我要在批处理文件(不改变已有的内容,只是一些额外的命令)的末尾添加一些更多的命令。是否有可能做到这一点,因为大多数批处理文件增量读取并执行一个接一个?还是系统读取该文件的全部内容,然后运行作业?

I am running a long running batch file. I now realize that I have to add some more commands at the end of the batch file (no changes to exisiting content, just some extra commands). Is it possible to do this, given that most batch files are read incrementally and executed one by one? Or does the system read the entire contents of the file and then runs the job?

推荐答案

我刚刚试了一下,对我的直觉,它在最后拿起新的命令(在Windows XP)

I just tried it, and against my intuition, it picked up the new commands at the end (on Windows XP)

我创建了一个包含一个批处理文件

I created a batch file containing

echo Hello
pause
echo world

我跑了文件,虽然它已被暂停,加入

I ran the file, and while it was paused, added

echo Salute

救了它和pressed进入到contine暂停,所有三个提示进行回显到控制台。

Saved it and pressed enter to contine the pause, all three prompts were echoed to the console.

所以,去了!

这篇关于更改批处理文件时,它的运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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