need help writing a .bat file

Discussion in 'Software' started by red death68, Jun 27, 2009.

  1. red death68

    red death68 Command Sergeant Major

    im trying to write a .bat file that essentialy opens up windows media player to a saved playlist and after the playlist is finished closes the media player and runs a second .bat file

    i need help with the code can anyone help me?
     
  2. kipfeet

    kipfeet Corporal

    I responded to your thread in the software forum. It's not what you want to hear, but it's some info, at least. Take a look and if you have any other questions about it, post in this thread or the other one. I can give you the raw batch file that will do everything that you want except close MP...that's why another player might be worth looking into.
     
  3. red death68

    red death68 Command Sergeant Major

    ill take the batch you got for now as long as it like i said runs program (ill figure sumtin out for closing it) and then runs a secondary batch file

    and tyvm in advance for the help
     
  4. kipfeet

    kipfeet Corporal

    OK, here you go...this works. Note, though, that an empty cmd window will appear on screen when the batch is run. It will disappear once you close mediaplayer.

    Copy the three lines below beginning with "@echo off" to a text editor, save the file, then rename the extension to "bat."
    Edit the bat file to reflect the following.
    In the wmplayer line, if the path to wmplayer isn't correct for your system, change it to the correct path (the quotation marks are necessary).
    In the wmplayer line where it says "NameOfPlayList," put in the name of your playlist instead, without any quotation marks.
    In the "second.bat" line, substitute instead the name (and path, if necessary) to your second batch file.

    Any questions or problems, yell. If you want me to write the whole batch file out for you, I'll need the name of your playlist, the path to your wmplayer, and the name of and path to your second batch file, but if you follow the instructions above, it will work.

    @echo off
    "C:\Program Files\Windows Media Player\wmplayer" /Playlist NameOfPlayList
    secondbat.bat
     
  5. red death68

    red death68 Command Sergeant Major

    i may go for the more extensive but ill have to get back to you on it
     
  6. hacker183

    hacker183 Private E-2

  7. patrickMc

    patrickMc Private E-2

  8. red death68

    red death68 Command Sergeant Major

    ok ill check it out when i have some free time
     
  9. red death68

    red death68 Command Sergeant Major

    ok i dont need to write file anymore found another way around it
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds