batch-file - Windows 批处理文件的 getopts?

标签 batch-file getopts

是否有一种简单的方法来检测通过命令行传递到批处理文件的选项/开关?我正在寻找类似于 shbashgetopts 的东西.

最佳答案

不,没有。

(批处理文件只能看到%0、%1、%2等和%*,加上variations such as %~d0, %~f1, %~x2 etc.)

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

相关文章:

batch-file - 批处理文件如果存在超时

batch-file - 批量比较数字

linux - 如何阻止 getopts 将空白或 null 或其他选项作为选项值

windows - Windows批处理脚本以解析CSV文件并输出文本文件

batch-file - 如何编写 Windows 批处理脚本来从目录复制最新文件?

bash - 为什么 getopts 只在第一次起作用?

linux - 这是写opts的正确方法吗

linux - 错误 : File not found with name : -a while using getopts

java - 在Windows bat文件中找到JRE安装以运行java程序的可靠方法