@echo off
setlocal
cd C:\Automation
ruby may11.rb
PAUSE
ruby multiYear.rb
PAUSE
ruby testcase2_mktAdjustment.rb
:select
set /P c=Do you want to exit [y/n]?
if /I "%c%" EQU "Y" goto optA
if /I "%c%" EQU "N" goto optB
goto select
:optA
pause
exit
:optB
:: no idea what you want to do here...
The @echo off
command turns echo
ing of the commands off. The @
actually turns off echo
for the current command, so that ECHO OFF
doesn't appear.
Using it in the manner you were will simply reproduce the line on-screen as a message, nothing more. It won't pause
or set
anything, just show the line after the keyword echo
.
I've changed a few other things.
:choice becomes :select because choice
is a batch keyword, best avoided as labels.
the colon in a goto
is not required and best omitted.
There's no indication what you want to do with a n
input.
Your set
command was not being executed. c
was not being set, so it failed both if
tests and simply entered an infinite loop.