Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This assignment is worth 6 points total, partial credit will be given, Purpose o

ID: 3809623 • Letter: T

Question

 This assignment is worth 6 points total, partial credit will be given,   Purpose of this program: To implement windows batch commands     1 - Worth 0.75 points. Using Windows batch Scripting.       - Using Windows terminal command, create a bat file named:        yourLastNameFirstNameInitialPgm4.bat      - Using the NOTEPAD editor, append the following data to your *.bat file         USING SINGLE LINE COMMENTS FOR EACH LINE       ********************************************************************        Author    : Your Name         Course    : OS section. Example OS1, OS2 OS3, OS4        Professor : Michael Robinson         Program # : Program Purpose/Description                     { A brief description of the program }                         Due Date  : MM/DD/YYYY                                              Certification:         I hereby certify that this work is my own and none of it is the work of any other person.                     *********************************************************************/     2 - Worth 1.75 points. Using Windows batch Scripting.       topic: Implement division by 0, with error trapping, using if and label loop commands,         - Using the NOTEPAD editor, append to the *.bat file, all the commands needed so         that when you execute your bat file, it will produce the following:       a) Append your name, current date and time to a NEW file called results.txt      b) Using two variables: FirstNumber and LastNumber, use a label loop.      c) Ask the user to enter the first number.      d) Ask the user to enter the second number.      e) If the user enters the value 66 for the first or the second number, you must         exit the loop immediately, and terminate this section ONLY.      f) If the second number is ZERO inform  the user that you CAN NOT divide by ZERO,         and ask for a correct second number.      g) If the second number is NOT a zero, do the division, display all numbers of          this computation using labels, and add the same to the results.txt file.                   example: 4 divided by 1 = 4     3 - Worth 1.75 points. Windows batch Scripting.      - Using the NOTEPAD editor, append to the *.bat file, all the commands needed so        that when you execute your bat file, this file will produce the following:           a) Use a for loop from 1 to 10.       b) Find the results of calculating each number from (1 to 10 mod 6) + 2.      c) After the for loop ends, display the average for all previous results and         append them to the results.txt file.     4 - Worth 1.75 points. Using Windows teminal mode commands ONLY      - Using the NOTEPAD editor, append to the *.bat file, all the commands needed so        that when you execute your bat file, this file will produce the following:              a) Create a directory called pgm4-       b) Go to folder pgm4      c) Create a file called one.txt      d) Insert into the one.txt file your name using a single line comments      e) Insert into the one.txt file the command that will display your name      f) Insert into the one.txt file the command that will display one empty line 

Explanation / Answer

Batch file is a kind of script file containing a list of computer commands/instructions to be carried out in sequence.

1.Batch files are normally created in notepad editor in windows.

In notepad editor , type the following commands:

echo MyFirstBatchFile

Save this file using "Save AsType" -->"All Files" -->" yourLastNameFirstNameInitialPgm4.bat"

Create another such notepad file "appenddata.txt"and type the followind data and save.

Go to Start and type Run. Next,Type:

CMD

It opens up the command prompt of Windows.

Hit Enter.

From the command prompt, type:

echo > yourLastNameFirstNameInitialPgm4.bat

Hit Enter.

TYPE appenddata.txt >>yourLastNameFirstNameInitialPgm4.bat

The typed code will be displayed on the screen.

2.

a)Using notepad editor, create the "results.txt" file.

We append our name, current date and time to this file, results.txt

Open command prompt and type the following commands for printing date and time and appending the same to this file results.txt

3.

@echo off

4)

Creating a new directory using Windows terminal mode commands,

C:>mkdir pgm4-

C:> cd pgm4-

C:>pgm4->notepad one.txt

C:/>pgm4->echo Name:John>one.txt

C:/>pgm4->one.txt>echo

C:/>pgm4->one.txt>echo.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote