Aug 03, 2017 · For each iteration, run [command]. The iterator variable %i can be used anywhere in the command to represent its current value. Iterate over file contents C:>for /F %i in ([file-set]) do[command] Iterate through the contents of the file on a line-by-line basis. For each iteration, store the contents of the line into %i and run [command]. Aug 03, 2017 · For each iteration, run [command]. The iterator variable %i can be used anywhere in the command to represent its current value. Iterate over file contents C:>for /F %i in ([file-set]) do[command] Iterate through the contents of the file on a line-by-line basis. For each iteration, store the contents of the line into %i and run [command].