I recently read some articles about batch files, and there are many things I don't understand. I sincerely ask the experts for guidance.
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN (string) DO command
FOR /F %variable IN ('command'
DO command
eol=c - specifies the end of a line comment character (only one)
skip=n - specifies the number of lines to skip at the
beginning of the file.
delims=xxx - specifies the delimiter set. This replaces the
default delimiter set of spaces and tabs.
tokens=x,y,m-n - specifies which token on each line is passed to
the for itself for each iteration. This causes
additional variable names to be allocated. The m-n
format is a range. It specifies the mth through nth
tokens. If the last character in the
token string is an asterisk,
then an additional variable will be allocated
and will receive the remaining text of the line
after the last token is parsed.
usebackq - specifies that the new syntax is used in the
following cases:
when executing a back-quoted string as a command, and
a single-quoted character is a literal string command, and
allows double quotes to enclose file names in
filenameset.
There are many things about FOR /F that I don't understand. I hope the experts can give more examples to explain the above parameters.
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN (string) DO command
FOR /F %variable IN ('command'
DO command eol=c - specifies the end of a line comment character (only one)
skip=n - specifies the number of lines to skip at the
beginning of the file.
delims=xxx - specifies the delimiter set. This replaces the
default delimiter set of spaces and tabs.
tokens=x,y,m-n - specifies which token on each line is passed to
the for itself for each iteration. This causes
additional variable names to be allocated. The m-n
format is a range. It specifies the mth through nth
tokens. If the last character in the
token string is an asterisk,
then an additional variable will be allocated
and will receive the remaining text of the line
after the last token is parsed.
usebackq - specifies that the new syntax is used in the
following cases:
when executing a back-quoted string as a command, and
a single-quoted character is a literal string command, and
allows double quotes to enclose file names in
filenameset.
There are many things about FOR /F that I don't understand. I hope the experts can give more examples to explain the above parameters.



