How to play a video and loop - from the command line

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
crossmyfingers1
Posts: 1
Joined: 16 Apr 2015 05:11

How to play a video and loop - from the command line

#1 Post by crossmyfingers1 » 16 Apr 2015 06:07

Hello, let me first say I am really new to creating .bat, so my apologies and second any help would be extremely help full. I am currently trying to creat a .bat file that runs a video on Windows 7 in full screen and continuously plays.
@echo off
start "" "C:\Program Files (x86)\Windows Media Player\WMplayer.exe" /play /fullscreen "C:\LOOP\XXX XXXX.MP4"
echo This is a loop
goto start

I am not sure the script is correct and I cannot get full screen to work. Could someone please help!

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Help with creating a video .bat

#2 Post by Ed Dyreen » 16 Apr 2015 09:07

That wouldn't work, you'd create an infinite amount of instances of wmplayer as your start command doen't '/WAIT' for wmplayer to close. the 2nd issue is that wmplayer never closes. Another problem is that goto start won't work as the label :start is nowhere to be found.

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

Re: Help with creating a video .bat

#3 Post by foxidrive » 16 Apr 2015 10:41

VLC is more suited to command line video playing -

Windows Media player changed several times in what it can and can't do on the command line - and it cant do much any more.

Post Reply