DOS - FOR Command

August 1, 2006 at 12:01:37
Specs: XP, N/A

I need help with a batch file. Basically I've got a list of servers I need to run through and running a command for each. Here it is.

for /f %%a in (serverlist.txt) do srvsec \\%%a >> srvsec.txt

That command above works great.. No problems. But I need to be able to echo the %%a before I run the srvsec command..
My question is how do I run 2 commands using something like the above?

See More: DOS - FOR Command

Report •

August 1, 2006 at 14:49:03

for /f %%a in (serverlist.txt) do (
echo %%a
srvsec \\%%a >> srvsec.txt

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question