Question
USE COMMAND PROMPT FOR THIS!! THE USER NAME WILL BE DIFFERENT AS YOUR OWN A DIFFERENT USER. A batch file can be used to issue
USE COMMAND PROMPT FOR THIS!! THE USER NAME WILL BE DIFFERENT AS YOUR OWN A DIFFERENT USER.
A batch file can be used to issue several commands in sequence. This is an effective means of simplifying several tasks.
I - Display message with the argument variable.
-
Within your c:\Users\cyberrange\batchFiles directory, enter notepad greet.bat. This command launches Notepad and creates a blank file called greet.bat. When prompted, choose Yes to create the file. The .bat file extension is required for batch files.
-
Pass name of the person to the batch file as an input parameter. Display a greeting( hello, bye, have a good day)with the name of the person and todays date.
-
The batch file is executed. Create, paste and save a screenshot of your screen reflecting both the notepad file and the command. Attach to the assignment for grading.
II - Sum.bat - to add two variables. 1. Within your c:\Users\cyberrange\batchFiles directory, enter notepad sum.bat Add the following text to the file. @echo off Title: Addition of two numbers.
2. Set numeric values in variable a and b. Calculate the addition of a and b and store it in variable c. Display value of variable c
3. The batch file is executed. Create, paste and save a screenshot of your screen reflecting both the notepad file and the output. Attach to the assignment for grading.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started