Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic for command

Status
Not open for further replies.

unmaxpine

Technical User
Jul 26, 2007
14
CH
Hello,


I come from unix, and I dont usertood why this basic script return me only the first value of the variable

Code:
set databases="TUTU,POPOP,KLKLK"
echo %databases%
for /F "delims=," %%h in (%databases%) do (echo %%h)

--> This will only return me TUTU, why ?
 
I honestly dont know why. ive been tinkering around with this for a week or so... i get the same results. ill keep trying. wish i could be more helpful.
 
Try using this from the command prompt:

C:>help for

When you see "Press any key for more..." then pressing enter only gives you 1 line at a time --and-- pressing the space bar will give you upto 25 more lines.

Note that " /F " is used for filenames.

--MiggyD

--> It's a bird! It's a plane! No, it's an OS update patch! Ahh!! <--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top