Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with modifying this script. I need

Hello!

I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with modifying this script.

I need to convert the entire batch file to use ONE NESTED IF STATEMENT.

NO LABELS IN THE BATCH FILE.

Thanks.

@ECHO off

SET ANS=%1

IF "%ANS%"=="" GOTO NOTHING

IF /I "%ANS%"=="B" GOTO BLUE

IF /I "%ANS%"=="G" GOTO GREEN

IF /I "%ANS%"=="R" GOTO RED

IF /I "%ANS%"=="Y" GOTO YELLOW

ECHO.

ECHO INVALID ENTRY, PLEASE REENTER

GOTO QUIT

:NOTHING

ECHO.

Echo You Entered Nothing

Echo Please Reenter

GOTO QUIT

:BLUE

ECHO.

color F1

Echo You picked Blue!

GOTO QUIT

:GREEN

ECHO.

color F2

Echo You picked Green!

GOTO QUIT

:RED

ECHO.

color F4

Echo You picked Red!

GOTO QUIT

:YELLOW

ECHO.

color F6

Echo You picked Yellow!

GOTO QUIT

:QUIT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions