Simple script to read 2 variables from text file, space-delimited

By , December 3, 2009 2:51 pm

@ECHO off
for /F "eol=; tokens=1,2" %%A in (list.txt) do call :create %%A %%B
Goto END-create
REM ***************************************************************************
:create
echo %1 %2
REM net user %1 /add
goto :EOF

:END-create
ECHO.
pause
EXIT

Leave a Reply

Spam protection by WP Captcha-Free

Custom theme by me. Based on Panorama by Themocracy

"What's this? Trix? Aunt! Trix? You? You're after the prize! What is it?" He picked up the box and studied the back. "A glow-in-the-dark squid! Have you got it out of there yet?" He tilted the box, angling the little colored balls of cereal so as to see the bottom, and nearly spilling them onto the table top. "Here it is!" He hauled out a little cream-colored, glitter-sprinkled squid, three-inches long and made out of rubbery plastic. -- James P. Blaylock, "The Last Coin"