Subscribe to Windows IT Pro
June 04, 2001 12:00 AM

JSI Tip 3760. How do I cause a batch file to beep for attention?

Windows IT Pro
InstantDoc ID #75078
Rating: (3)


To cause a batch file to beep for attention, you need to send a BEL character.

The easies way to do this is to open a CMD prompt and CD to a folder in your path. Then type:

edit bell.bat
@echo<space><CTRL+P><CTRL+G><ENTER>
<ALT+S>           (Saves bell.bat)
<ALT+X>           (Exits edit)
NOTE: <> indicates that you type the key(s) within the <>.

            CONTROL CHARACTERS

   Decimal  Hexadecimal  Character  Mnemonic

   00       00           NUL        ^@
   01       01           SOH        ^A
   02       02           STX        ^B
   03       03           ETX        ^C
   04       04           EOT        ^D
   05       05           ENQ        ^E
   06       06           ACK        ^F
   07       07           BEL        ^G
   08       08           BS         ^H
   09       09           HT         ^I
   10       0A           LF         ^J
   11       0B           VT         ^K
   12       0C           FF         ^L
   13       0D           CR         ^M
   14       0E           SO         ^N
   15       0F           SI         ^O
   16       10           DLE        ^P
   17       11           DC1        ^Q
   18       12           DC2        ^R
   19       13           DC3        ^S
   20       14           DC4        ^T
   21       15           NAK        ^U
   22       16           ETB        ^W
   23       17           SYN        ^V
   24       18           CAN        ^X
   25       19           EM         ^Y
   26       1A           SUB        ^Z
   27       1B           ESC        ^[
   28       1C           FS         ^\ 
   29       1D           GS         ^]
   30       1E           RS         ^^
   31       1F           US         ^_



Related Content:

ARTICLE TOOLS

Comments
  • Lannon
    2 years ago
    Nov 17, 2010

    Easy to do on Windows systems that dont have the DOS Edit app (like Windows 7 64bit). At a command prompt, change to your favorite directory and type
    copy con beep.txt
    CTRL+G
    CTRL+Z
    ...There will be a file named beep.txt in the current directory. Copt and patch its contents to your batch file.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.