Jump to content

@echo off not working inside batch script loop

Hi all,
trying to write a pretty simple batch scrip that asks the user how many times they want to run another batch scrip and then does so all in one console window. Here's the code:
@echo off
set /P number="how many machines? "
set /A s=1  REM a variable referenced in the other script to indicate which instance the user is up to
FOR /L %%A IN (1,1,%number%) DO (
beta.bat  REM the other script
set /A s+=1
)

I've gotten it to work with one exception; when the script repeats the other batch file, the console will output:
(last line of the script)

[whatever s equals]

c:\users\(username)\desktop>(

 beta.bat

 set /a s+=1
)

(first line of the repeated script again)

 

How can I get it to just go:
(last line of the script)

(first line of the repeated script again)

without saying any of the other information about s or the name of the bat file

 

any help is appreciated, 
thanks in advance

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×