Create a batch file that runs an audio file in the background

Tacos_Guy -  
 SuperAvatar -

Hello, I would like to create a batch file that plays an audio file in the background, but I'm having trouble doing it.

Please help me.


1 réponse

SuperAvatar
 

To launch an audio file in the background using a batch script, you can use the following command:

start /min mplayer <audio file name>

Here is an example of a batch script that launches an audio file named "musique.mp3" in the background:

@echo off start /min mplayer musique.mp3

To run this script, you can save the code above in a text file with the ".bat" extension, then double-click the file to execute it. The audio file will be launched in the background and you will be able to continue using your computer normally while the audio file is playing.

Note: the "start" command allows you to launch a program or a file, while the "/min" option specifies that the program should be launched minimized. The "mplayer" command is a media player that can be used to play audio and video files. If you do not have mplayer installed on your computer, you can use another media player, such as VLC or Windows Media Player, using the appropriate command.

0