Operating_systems-page42

Operating_systems-page42 - Jelena Mamenko Operating Systems...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Jelena Mamenko Operating Systems Lecture Notes on Operating Systems 42 This file sets the PATH, defines a prompt and a temporary directory, runs a utility program and then clears the screen and types a menu. Batch Sample #1 Here is a sample batch file you might use to periodically back up and clear a word processing data disk. It assumes that word processing backup files are named with extension .BAK, you don't want them, and they are on the disk in drive B:. The batch file is called BAK.BAT and is also on the word processing data disk in drive B:. Start it by typing B:BAK. @ECHO OFF CLS ECHO * * * Word processing cleanup * * * ECHO Put backup disk in drive A: PAUSE ERASE B:*.BAK COPY B:*.* A: DEL A:BAK.BAT ECHO Backup is complete. Label your disk. The first line turns screen echo off. The next line clears the screen. A label is then displayed with instructions on where to place the backup disk. A keypress needed to continue, then all .BAK files are erased and all files on drive B: are copied to A:. The batch file is then deleted from A: and files are erased and all files on drive B: are copied to A:....
View Full Document

This note was uploaded on 12/29/2011 for the course CSE 362 taught by Professor Mavin during the Spring '09 term at SUNY Stony Brook.

Ask a homework question - tutors are online