Explanation of the FOR command. It is a BATCH command. This command is used in a BATCH file and will run a specified command for each file in a set. Example: To type all .DOC files in drive A you would use the following command in your batch file: for %%f in (*.doc) do type %%f