Computer sciences and Information technology
Please Read The Whole of This Document Carefully
Automated Backup Programs Task
Your task is to write an automatic backup program in the batch language of each of MS-DOS and the Bash shell. That is, two versions of the program, one for each batch language. At a basic level the program will interact with the user to find out the name of a directory, check it exists and if it does back it up to a second directory (also supplied by the user), creating the backup destination directory if needed.
As far as possible the operation of the MS-DOS file and the Bash shell script should be the same. Your code will be properly commented and exhibit a good program structure (indentation etc.). There are three levels of task with increasing complexity. You can decide how many of the complexity levels you wish to attempt but the more you attempt the higher potential marks you will be eligible to get.
Complexity Level 1 (for a maximum mark of 40 (50%) out of the 80 marks available if done well and documented properly)
The programs will do just what is described above, and will be totally interactive. That is, will be wholly menu driven and obtain the source (backup from) and destination (backup to) directories from the user. There will be a facility to do several backups or to quit.
Complexity Level 2 (for a maximum mark of 52 (65%) out of the 80 marks available if done well and documented properly)
The programs will have all the functionally of complexity level 1 but will have an additional function that if a source and destination directory are supplied as parameters on the command line it will attempt to back up the given source (if it exists) to the given directory (creating it if needed) without giving the user a menu (thus providing a “quick” command line mode). If no command line parameters are supplied or the wrong number (in which case it will generate an error) are given it will default to the menu mode.
Complexity Level 3 (for a maximum mark of 80 (100%) out of the 80 marks available if done well and documented properly)
The programs will have all the functionally of complexity level 2 and will additionally be able to create batch/shell script files to automate the backup. For example using either the command line or interactive mode the user will be able to specify either a single backup operation (command line mode) or a set of backup operations (menu mode) which will be used to create a batch or shell script file (as named by the user, possibly on the command line if that mode is used) to allow the user to then repeat the backup as often as they want. For the shell script version the protection on the file should be changed so that the file can be run. For full marks the scripts that your programs create should also contain checks relating to the source and destination directories existing as appropriate.