批次:对于什么是使用这个符号? (百分号星号) [英] Batch : For what is this symbol used? (percent-sign asterisk)

查看:651
本文介绍了批次:对于什么是使用这个符号? (百分号星号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个批处理文件这一行:

I have in a batch file this line :

Test.exe %*

我在谷歌搜索,我发现这个交代:

I searched in google and I found this explaination :

一些DOS版本使用此标志加上一个百分号(%*)重新present在批处理文件在命令行上所有参数。

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

但我还是不明白如何使用此命令...

But I still don't understand how to use this command...

感谢您!

推荐答案

这是用于转发在你调用批处理文件到另一个应用程序的参数。

This is used to forward the parameters you passed in to the batch file to another application.

例如,如果你调用 batch.bat参数1参数2参数3 param4 和你batch.bat文件中有 Text.exe%* ,这将等同于调用将Test.exe参数1参数2参数3 param4

For example if you call batch.bat param1 param2 param3 param4 and inside your batch.bat file you have Text.exe %*, it will be equivalent as calling Test.exe param1 param2 param3 param4

这篇关于批次:对于什么是使用这个符号? (百分号星号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆