开发者

How do I make a batch file start at the top when run?

I've created a batch file, but when I run it and it loads, it goes down 开发者_Python百科to where the user input is, cutting off part of my program.

Is there any way to make it start at the top and make the user have to manually scroll it down to look at what he's entering in?


If you mean you generate a lot of text to the console (more than one page worth) and then ask the user a question, like:

type bighonkintextfile
set /p answer=Yes?

I see only one quick solution. Don't just generate all that output. Pass it through a pager of some sort, something like:

type bighonkintextfile | more
set /p answer=Yes?

Then the user will be able to read it from the top and once more exits, the user will be asked for a response.

If you want something more robust or pretty-looking, I'd be looking at doing that with a well-crafted executable rather than a batch file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜