Subscribe to Windows IT Pro
October 17, 2001 12:00 AM

Hidden for /f Feature

Windows IT Pro
InstantDoc ID #22359
Rating: (0)

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.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.