Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


Return to article

Hidden for /f Feature
 

Editor's Note: Share your Windows 2000 and Windows NT discoveries, comments, problems, solutions, and experiences with products and reach out to other Windows 2000 Magazine readers (including Microsoft). Email your contributions (400 words or less) to r2r@win2000mag.com. Please include your phone number. We edit submissions for style, grammar, and length. If we print your submission, you'll get $100. Submissions and listings are available online at http://www.win2000mag.com/articles. Enter the InstantDoc ID number in the InstantDoc ID text box.

The for /f batch file command contains a little-known feature. As the following example shows, you can use multiple token selections in the statement.

for /f "tokens=1,2,3" %%a
   in (textfile.txt) do call
	:Func1 %%a %%b %%c

This command passes the first, second, and third tokens on the line in your batch file to Func1.







Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement