如何读取控制台输入在批处理文件? [英] How to read input from console in a batch file?
本文介绍了如何读取控制台输入在批处理文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在批处理文件中读取控制台输入?我试图做到的,是在C scanf函数的功能如何可以做同样的批处理文件?
How do I read input from the console in a batch file? What I am trying to achieve is the functionality of scanf in C. How can I do the same in a batch file?
推荐答案
在链接的重复提出的code段读取用户输入。
The code snippet in the linked proposed duplicate reads user input.
ECHO A current build of Test Harness exists.
set /p delBuild=Delete preexisting build [y/n]?:
因为他们希望用户可以键入多个字母,它会进入delBuild变量。
The user can type as many letters as they want, and it will go into the delBuild variable.
这篇关于如何读取控制台输入在批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文