Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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.

Download and unzip the file ASSIGN3.ZIPimage text in transcribed in an empty directory.

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

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

Step: 3

blur-text-image

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions