Cannot seem to play audio

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Cannot seem to play audio

#1 Post by qwerty2jam » 27 Aug 2012 20:39

Hey all,

Just having a little issue that the answers on google havn't been able to solve for me. I'm fairly new to batch so take it easy on me :D
Now the code is as follows;

@ECHO OFF
CD Diner
CD "Diner clues"
Herp.jpg
Derp.jpg
Sonic.jpg
Arrival.txt

This has worked beautifully and opens all the named files when I run the .bat. However I also want an audio/video file to play the file name is HD. I though it would play if I just followed what was done here. However I recieve the message 'HD is not a command or a file that can be opened'.

Is there any way for me to do this? It's probably really obvious.

Cheers,

Qwerty2jam

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Cannot seem to play audio

#2 Post by Squashman » 27 Aug 2012 20:48

File extension?

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#3 Post by qwerty2jam » 27 Aug 2012 21:20

oh sorry mpeg - 4

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Cannot seem to play audio

#4 Post by Squashman » 27 Aug 2012 21:23

qwerty2jam wrote:oh sorry mpeg - 4

So your file name with the extension is HD.mpeg - 4 and that is how you have it listed in your batch file?

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#5 Post by qwerty2jam » 27 Aug 2012 22:50

Sorry no it is HD.mp4 in the folder

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cannot seem to play audio

#6 Post by foxidrive » 28 Aug 2012 02:13

Try this:

Code: Select all

@ECHO OFF
CD Diner
CD "Diner clues"
start "" Herp.jpg
start "" Derp.jpg
start "" Sonic.jpg
start "" Arrival.txt
start "" HD.mp4

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#7 Post by qwerty2jam » 28 Aug 2012 03:32

Sadly that did not work it just opens up every file except HD like before.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Cannot seem to play audio

#8 Post by abc0502 » 28 Aug 2012 03:59

qwerty2jam wrote:Sadly that did not work it just opens up every file except HD like before.

can you post the location of the software you use to open the mp4 files.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cannot seem to play audio

#9 Post by foxidrive » 28 Aug 2012 04:39

@OP: you either don't have a program registered for MP4 filetype or the HD.mp4 is corrupted or is another filetype that has been renamed.

Try playing the HD.MP4 by double clicking on it. What happens?

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#10 Post by qwerty2jam » 28 Aug 2012 05:23

It plays as it is meant to in windows media player

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cannot seem to play audio

#11 Post by foxidrive » 28 Aug 2012 05:35

Run this and see what it says on the screen.

@ECHO OFF
CD Diner
CD "Diner clues"
start "" HD.mp4
pause

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#12 Post by qwerty2jam » 28 Aug 2012 05:40

System cannot find the path specified....doesn't work :(

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cannot seem to play audio

#13 Post by foxidrive » 28 Aug 2012 05:44

Ok, it would seem that the file is not in the folder you are changing directory to, or it is on a different drive to the batch file.

Try this and copy the screen and paste into a reply, if you still need help.

Code: Select all

@ECHO OFF
CD Diner
pause
CD "Diner clues"
pause
dir *.mp4 /b
start "" HD.mp4
pause
echo wait and copy the screen.
pause

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Cannot seem to play audio

#14 Post by foxidrive » 28 Aug 2012 05:47

Is the batch file on your desktop? Is the folder diner\diner clues on the desktop too?

qwerty2jam
Posts: 7
Joined: 27 Aug 2012 20:32

Re: Cannot seem to play audio

#15 Post by qwerty2jam » 28 Aug 2012 06:11

Okay the batch file is inside diner.
Diner Clues is inside diner.
HD is inside diner clues.

The latest code puts out no error message outside of cmd but puts the path could not be found in the cmd. (sorry doing this on my phone + comp with no net cant C+P)

Post Reply