Linux-Noob Forums

Full Version: Make a Batch File that Beeps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Note: this is specifically directed to the internal PC Speaker, not the normal multimedia soundcards and speakers on modern equipment.

 

 

You can write a DOS batch file that beeps by doing the following- at the DOS prompt type:

echo @echo (Alt-7)>beep.bat

 

but instead of typing the characters: "(Alt-7)", you hold down the Alt key and press 7 on the numeric keypad.

Don't use the 7 on the qwerty part of the keyboard, it has to be on the keypad, and Num Lock has to be on.

 

The effect of this is to output the characters:"@echo " followed by a non-ASCII character with a decimal value of 7, into a new file called beep.bat

 

You'll probably want to set the properties for the beep.bat DOS window to close on exit too.