Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 672 Posts 216 Joined 2003-06-12 00:00 23-year member UID 4976 Gender Female
Status Offline
Format: for %% in do
Function: repeatedly execute the DOS command in the for statement.
For example: suppose the batch file abc.bat contains the following:
for %%c in (*.txt) do type %%c
The result of executing it is that it displays the contents of all files with the txt extension in the current directory one by one. The loop does not end until all of them have been displayed.
Equivalent to executing the type command one file at a time