|
| ||||||||||
| Tags: batch file, compaq, computer, sound file, windows batch file, windows ms dos, windows xp |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How can I play a sound file from a Windows batch file?
I am new to this forum. I know how to create batch file. I just want to know that is it possible to play a sound file from a Windows batch file. If yes, then can anyone tell me how can I play a sound file from a Windows batch file? Please help me. Thanks in advanced. |
|
#2
| ||||
| ||||
| Re: How can I play a sound file from a Windows batch file?
If you want to play sound file like wave file (*.WAV) from Windows batch file then you have to use following command. If you are using Windows 95, then use following command: mplayer.exe /play /close <wave file> For example: mplayer.exe /play /close c:\windows\ringtone\nokia.wav If you are using Windows NT, then use following command: mplay32.exe /play /close <wave file> For example: mplay32.exe /play /close c:\winnt\ringtone\IPL.wav |
|
#3
| ||||
| ||||
| Re: How can I play a sound file from a Windows batch file?
Hey you can play a sound file from a Windows batch file by using Windows mplay32.exe or mplayer.exe file. These are included with Microsoft Windows, which is used to play Windows sound files. If you are using Windows 95 and 98 then you must use mplayer instead of mplay32. You can do this in the following ways. mplay32 /play /close c:\windows\media\chimes.wav In the above code I have use mplay32 as the program to play the file. |
|
#4
| ||||
| ||||
| Re: How can I play a sound file from a Windows batch file?
as per my knowledge you can play a sound file from a Windows batch file using mplay32.exe or mplayer.exe file. Just try to understand following example. mplay32 /play /close "c:\windows\media\Nokia.wav" In the above code I have give path of sound file. This is media player is only able to play .wav, .mid, *.cda, *.avi, *.asf files. You can not play .mp3 file. |
|
#5
| ||||
| ||||
| Re: How can I play a sound file from a Windows batch file?
Hey if you are want to play mp3 file from a Windows batch file, then you have to use start command. It means if you wanted to open media player that can play 'rehnas.mp3" in the batch file then you have to use following code: start music.mp3. Note: This will open your default media player. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How can I play a sound file from a Windows batch file?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Batch file to output directory names and size to txt file | m2thearkus | Software Development | 6 | 16-07-2010 12:04 AM |
| Windows Media Player cannot play file because there is a problem with your sound device. | dimpy00 | Media Player | 1 | 29-06-2010 04:33 AM |
| Windows Media Player cannot play the file because there is a problem with your sound device | rEDNESS | Media Player | 5 | 08-10-2009 01:09 AM |
| Dos batch file to sort files based on file names. | Jon Osborn | Windows Server Help | 9 | 17-06-2009 11:06 AM |
| How can I play a Wav file from batch/cmd script? | NaFula | Windows Vista Performance | 3 | 13-09-2008 09:21 PM |