"Alarming" batch files


If you use batch files to automate routine chores, you may occasionally need a more insistent batch file than what the standard simple beep or screen message provides ù to let you know that a particular routine has been executed or to remind you about another task. To play a sound from a DOS batch file, you can use the /play and /close command-line switches with either Media Player or Sound Recorder. For the latter to play a sound that alerts you to errors, try adding a line like this: sndrec32.exe /play /close c:\windows\media\error.wav, replacing the path and file name with corresponding IDs for one of your own .wav files. For Media Player, type mplayer.exe /play /close c:\windows\media\error.wav. If you don't want a sound utility popping up on screen during your batch file, you can take reader Steve Gibson's advice and use Wav.exe, a freeware command-line sound player designed just for batch files. It's available at www.basicguru.com/cmdtools or from this monthÆs cover CD.

- Scott Dunn

Caption: Make your batch files speak with the right command line for Sound Recorder


Category:win9x
Issue: November 1999

These Web pages are produced by Australian PC World © 1999 IDG Communications