Wednesday, July 24, 2019
Operating systems Essay Example | Topics and Well Written Essays - 1000 words
Operating systems - Essay Example This program is in the complicity level three since it is able to create a batch file to run the automatic back up process. The interaction takes place through a dialogue in a command line mode. It will also be able to operate in a work schedule such that it can run repeatedly. It will run in a multiple back up operation for moving many files in the same session. The backup system will present the menu in command line forms through the same dialogue system. However, the naming system will be a dynamic naming system depending on the userââ¬â¢s discretion, where the system will allow the user to specify the naming protocol, either by use of incremental alphabetical and numerical characters and perhaps linked to the dayââ¬â¢s date. The changes in the codes of the batch file will alter the way the file runs. It checks the availability of the source of the files to be backed up as well as the destination directories which are in existence. Simple Source code @echo off :: variables s et drive = C:\Backup set folder = %date:~7,2% set backupcmd = xcopy /s /c /d /e /h /i /r /k /y @pause echo ### Backing up directory... %backupcommand% "C:\Program Files\dir1" "%dirve%\%folder1%" @pause echo The file Backup process Completed successfully @pause @pause @pause We save the file as backup.bat and we see the icon below On running the file the output below appears Result Press any key to continue . .. ### Backing up directoryâ⬠¦ '"C:\Program Files\dir1"' is not recognized as an internal or external command, operable program or batch file. Press any key to continue . . . The file Backup process Completed successfully Press any key to continue . . . Advanced Source code @echo off :: Declaring source code variables set drive = C:\BatchBackup set bapcmd = xcopy /s /c /d /e /h /i /rà /y @pause @pause echo ### Program for backing up the Documents... %bapcmd% "%USERPROFILE%\My Documents" "%D%\My Documents" echo ### Backing up the Favorites... %bapcmd% "%USERPROFILE%\Site" " %C%\ bapcmd " @pause @pause echo ### The system is Backing up all the Em and address book. %bapcmd% "%USERPROFILE%\Applic Data Files\Microsoft\AddBk" "%C%\ My Address Book" %bapcmd% "%USERPROFILE%\Local Settings\ Applic Data\Identities" "%C%\Outlook Express" @pause @pause echo ### System is Backing up all Ems and Em contacts in MS Outlook express %bapcmd% "%USERPROFILE%\s\ Applic Data\MS Outlook" "%C%\Outlook" @pause @pause echo ### System Backing up Registry********* if not exist "%C%\Registry" mkdir "%D%\Registry" if exist "%C%\Registry\regbackup.reg" del "%D%\Registry\regbackup.reg" regedit /e "%D%\Registry\regbackup.reg" @pause @pause ::Registry Backup Completed Successfully :: use below syntax to backup other directories... :: %bapcmd% "C" "%drive%\ % "D" "%drive% echo System successfully completes Backup Process! @pause @pause @pause Result Press any key to continue . . . Press any key to continue . . . ### Program for backing up the Documents... '"C:\Users\COLOO\My Documents" ' is not recognized as an internal or external com mand, operable program or batch file. ### Backing up the Favorites... '"C:\Users\COLOO\Site"' is not recognized as an internal or external command, operable program or batch file. Press any key to continue . . . Press any key to continue . . . ### The system is Backing up all the Em and address book. The system cannot find the path specified. The system canno
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.