Computing.Net > How-tos > Windows XP > multiple commands in DOS FOR LOOP

multiple commands in DOS FOR LOOP

By: Tai NGUYEN C2P

Hello everyone,

I have just found out the way to execute multiple commands in DOS FOR LOOP. The trick is '&' between commands

Ex:
echo. > t.tmp
for /f %%a IN ('dir /b *.sql') do ( echo PROMPT %%a >> t.tmp & echo @%%a >> t.tmp)

Have fun !!!

Tai NGUYEN C2P


Related Posts

See More