Dos - Trigger beep in batch file

By xngo on November 26, 2019

You can't directly type the beep character in a text editor. To get the beep character, execute echo ^G>>beep.txt on the command line(don't type ^G, but <Control>-G, which will be shown as ^G on the screen. Then, open beep.txt. Copy the beep character and paste it after the echo in your batch file.

DOS - beep character

Note: Don't forget to turn on your speaker. Otherwise, you will not hear it.

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.