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

Create a batch file that does the following:Accepts from the command line the fo

ID: 3603192 • Letter: C

Question

Create a batch file that does the following:Accepts from the command line the following variables:

Year (four digit number) of log files that they want to archive

Month (two digit number) of log files that they want to archive

Does not display any of the commands to the screen

Display just the files names of all of the files in the directory and subdirectories that have the archive attribute turned on in a “wide” display on screen at a time.

Display the message “Beginning archive utility at” and then display the current date and time.

Create a subdirectory called archive. If this directory already exists, do not report out an error message.If there are files that correspond to the month and year:

Create a subdirectory in the archive directory that corresponds to the month and year entered (six digit number using the format yyyymm)

Move all files with a file name that begins with the corresponding month and year entered (six digit number using the format yyyymm)

If there are not any files that correspond to the month and year entered

Returns an error message to explain what happened and the type of input that was expected

Turn off the archive attribute of only the files that have been moved.

Display just the files names of all of the files in the directory and subdirectories that have the archive attribute turned off.

Run the batch program from a different directory and send the output to a file call output1.log, output2.log, or output3.log (depending on which “run” you are doing) in the directory from which the program is run from. The program needs to be executed three times. Use the following values as user input:

The first time use the year 2010 and the month of December

The second time use the year 2011 and the month of January

The third time use the year 2012 and the month of February

What to turn in

Submit a text file with the commands used to run the batch file

Submit the batch file

Submit the three log files

Explanation / Answer

then you will be able to call it from your batch file thus: