什么是*%意味着一个批处理文件 [英] What does %* mean in a batch file

查看:681
本文介绍了什么是*%意味着一个批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过%*的批处理文件和命令行的用法。谷歌搜索没有给我任何结果。有些人能够解释%*的典型用法与example.Thanks

I have seen the usage of %* in batch files and command lines. Googling did not give me any results. Can some one explain the typical usage of %* with an example.Thanks

推荐答案

这意味着在命令行中的所有参数。

It means "all the parameters in the command line".

例如,当你想通过命令行从您的批处理文件转发到另一个程序是非常有用的:

For example, it's useful when you want to forward the command line from your batch file to another program:

REM mybatchfile.cmd
echo You called this with arguments: %*
echo I will now forward these to the DIR command.
dir %*

这篇关于什么是*%意味着一个批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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