Wednesday, August 17, 2011

When I use For /f in batch file I cannot export the results to a text file with > Command?

I'm running a windows batch file with the line: FOR /F %%b IN (userlist.txt) DO myprogram %%b > results.txt the command runs OK but the output to text file doesn't work (empty file is created but outputs to screen ok) BUT if outside of the batch file I run myprogram value > results.txt it outputs fine so presumably I need to change something due to running the For /f loop ?

No comments:

Post a Comment