gpt4 book ai didi

batch-file - 交互式批处理文件

转载 作者:行者123 更新时间:2023-12-05 08:35:27 25 4
gpt4 key购买 nike

如何处理交互式批处理文件?

例如,

你想继续吗? [是/否]

如果 'y' 转到 Label1

否则转到 Label2

谢谢

最佳答案

您可以使用 SET 命令。以下是与上面的伪代码等效的 DOS 命令:

set /p choice=Do you want to continue? [y/n]
if '%choice%'=='Y' goto label1
goto label2

关于batch-file - 交互式批处理文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/610345/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com