For /F usage

One of my favorite commands in batch programming is the For /F command.  Here's an example:

 For /f "tokens=*" %%a in (textfile.txt) do echo %%a
What that would do, is simply read through each line of the textfile.txt file and print it on the screen.
To use this on the command line for testing, simply change the double "%%" to a single "%".

Here's another example:

For /f "tokens=1" %%a in ("C:\folder\textfile.txt") do call :process %%a
goto doneprocess
:process
set var1=%1
{insert various commands to process var1 here}
echo %var1%>>output.txt
goto :eof
:doneprocess