Question
Procedure Create a batch file (DOS) that does the following:Accepts from the command line the following variables: Year (four digit number) of log files that
Procedure
Create a batch file (DOS) 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.ZIP 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
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