本文介绍了%% a是什么意思? (批)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
%% a是什么意思?
我了解上下文,但不了解如何使用它.例如:
What does the %%a mean?
I understand the context but not how to use it.For example :
FOR %%a in (%HELP%) DO echo I don't Know what it means
推荐答案
%%a
指代for循环将写入的变量的名称.
%%a
refers to the name of the variable your for loop will write to.
引自for /?
:
FOR %variable IN (set) DO command [command-parameters]
%variable Specifies a single letter replaceable parameter.
(set) Specifies a set of one or more files. Wildcards may be used.
command Specifies the command to carry out for each file.
command-parameters
Specifies parameters or switches for the specified command.
To use the FOR command in a batch program, specify %%variable instead
of %variable. Variable names are case sensitive, so %i is different
from %I.
示例1:
for %%a in (A B C D E) do Echo %%a
生产
A
B
C
D
E
示例2:
for %%a in (A B C) do (for %%b in (1 2 3) do Echo %%a:%%b)
生产
A:1
A:2
A:3
B:1
B:2
B:3
C:1
C:2
C:3
这篇关于%% a是什么意思? (批)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!