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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can NT scripting do multiple commands per FOR loop

Status
Not open for further replies.

Tison

Programmer
Joined
May 12, 1999
Messages
216
Location
CH
Can I do this ;

set LST=A B C D
for %%A in (%LST%)
do
echo "Checking %%A...'
if exist %%A echo "Yes"
if not exist %%A echo "Not"

Is there a line continuation char in NT script ?
 
Not sure, I'd try it and see.

If it doesn't handle multi-line FOR loops, try

for %%A in (%LST%) do call somefile.bat

and call a batch file that has all the commands in it you want to process. [auto] MCSE NT4/W2K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top