batch-file - 批处理 : For what is percentage followed by asterisk used?

标签 batch-file dos

我在批处理文件中有这一行:

Test.exe %*

我在谷歌搜索,找到了这个解释:

Some DOS versions use this sign coupled with a percent sign (%*) to represent all parameters on the command line in a batch file.

但是我还是不明白这个命令怎么用...

谢谢!

最佳答案

这用于将您传递到批处理文件的参数转发到另一个应用程序。

例如,如果您调用 batch.bat param1 param2 param3 param4 并在您的batch.bat 文件中包含 Text.exe %*,则相当于调用Test.exe 参数1 参数2 参数3 参数4

关于batch-file - 批处理 : For what is percentage followed by asterisk used?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19913019/

相关文章:

batch-file - Windows批处理是否支持异常处理?

c - DOS disable() 类似函数的宏

assembly - 不知道如何一次打印整个日历

windows - 无法通过 runas 命令捕获输出

windows - 为什么以参数/等待开始的命令无法正常工作?

batch-file - 使用批处理文件合并多个csv文件

javascript - 管理(最小最大恢复)node webkit(或node.js或cmd)中的其他窗口 - 任务栏替代方案

c++ - 如何将键盘输入发送到 Windows 98 中以窗口模式运行的 dos 应用程序

assembly - 获取当前目录名称程序集8086 tasm

assembly - TASM 中的 "Near jump or call to different CS"错误