<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Disqus - Latest Comments for jwalker</title><link>http://disqus.com/people/15c7ccbb1c5bec2e26c66833ad13973c/</link><description></description><language>en</language><lastBuildDate>Tue, 24 Feb 2004 05:45:09 -0000</lastBuildDate><item><title>Re: Processing the contents of a text file using FOR loop | Batch file programming | Tech-Recipes</title><link>http://tech-recipes.disqus.com/processing_the_contents_of_a_text_file_using_for_loop_batch_file_programming_tech_recipes/#comment-2767377</link><description>If you need to run multiple commands against one of the computers in the list, you can structure in the following way (my comments formatted for batch files; change double percents (%%) to single (%) to run on command line:&lt;br&gt;&lt;br&gt;&lt;strong&gt;FOR /f %%a in ('complist.txt') do call :MY_SUB %%a&lt;br&gt;GOTO SUB_DONE&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;:MY_SUB&lt;/strong&gt;&lt;br&gt;&lt;br&gt;REM Here, the computer name was passed as a parameter, so it comes in as %1&lt;br&gt;&lt;br&gt;REM Example - copy a file to the computer&lt;br&gt;copy myfile.txt \%1c$&lt;br&gt;&lt;br&gt;REM run this to end the subroutine&lt;br&gt;&lt;br&gt;&lt;strong&gt;GOTO :EOF&lt;/strong&gt;&lt;br&gt;&lt;strong&gt;:SUB_DONE&lt;/strong&gt;&lt;br&gt;&lt;br&gt;REM subroutine is finished, rest of the batch file continues</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jwalker</dc:creator><pubDate>Tue, 24 Feb 2004 05:45:09 -0000</pubDate></item></channel></rss>