你怎么在循环Windows批处理文件? [英] How do you loop in a Windows batch file?
问题描述
什么是Windows批处理文件的语法的循环?
FOR %% A IN(名单)DO命令参数
列表是任何元素的列表,方法是空格分隔,逗号或者分号。
命令可以是任何内部或外部命令,批处理文件,甚至 - 在OS / 2和NT - 命令列表
参数包含命令的命令行参数。
在这个例子中,命令将被一次在列表中的每个元素执行,如果指定使用的参数。
一个特殊类型的参数(甚至命令)是%% A,将由每个元素从列表中可以连续substituded。
What is the syntax for a FOR loop in a Windows batch file?
FOR %%A IN (list) DO command parameters
list is a list of any elements, separated by either spaces, comma's or semicolons.
command can be any internal or external command, batch file or even - in OS/2 and NT - a list of commands
parameters contains the command line parameters for command. In this example, command will be executed once for every element in list, using parameters if specified.
A special type of parameter (or even command) is %%A, which will be substituded by each element from list consecutively.
From FOR loops
这篇关于你怎么在循环Windows批处理文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!