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
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
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:
One important point not listed in any of the previous answers:
%*
expands to all parameters from the command line, even after aSHIFT
operation.Normally a
SHIFT
will move parameter%2
to%1
,%3
to%2
, etc., and%1
is no longer available. But%*
ignores anySHIFT
, so the complete parameter list is always available. This can be both a blessing and a curse."The %* modifier is a unique modifier that represents all arguments passed in a batch file. You cannot use this modifier in combination with the %~ modifier. The %~ syntax must be terminated by a valid argument value."
See:
%*
expands to the complete list of arguments passed to the script.You typically use it when you want to call some other program or script and pass the same arguments that were passed to your script.