-1

I have a CD with the following folders:

CDI
EXT
MPEGAV
PICTURES
SEGMENT
VCD

I want to make a file autorun.bat that when clicked will start the video.
How to do it?

Here are the details of each Folder's contents -

CDI CDI picture here

EXT EXT image

MPEGAV MPEGAV Picture

The rest of the folders are empty.

The folders run only 1 video. (no more updates sorry, i lost the CD.)

ijka5844
  • 45
  • 10
  • Hi and welcome to stack overflow! can you give us an idea of the file structure within the cd? use the cd command in command prompt to navigate into the cd (probably a different drive letter, try cd /D E:\) (replace E with the proper drive letter) Then type dir /S – IoCalisto Jul 17 '19 at 19:09
  • I ask this because I'm somewhat confused by your question. Are there multiple videos? Would you like all videos to be played from every folder? What type of video are they (what file extension)? I would also like to ask you to do some of your own research on at least attempt to build a batch file, and to then share the code with us! – IoCalisto Jul 17 '19 at 19:16
  • 1
    The output of `tree /f` would be even better (if it's not too long) – Stephan Jul 17 '19 at 19:55
  • @loCalisto - There is 1 video, i always see it being played by Windows Media Player so i guess it as mp4 or DAT – ijka5844 Jul 18 '19 at 11:51
  • i just added a picture of the contents of each folder. – ijka5844 Jul 18 '19 at 12:02

1 Answers1

2

I'm going to answer this with some assumptions, knowing that you only told us about the folders on the CD and not any information where "the video" resides or what type of file "the video" even is. We don't know quite a lot that should be in the question you posted.

  1. First you need to make an autorun.inf file. You can do this in notepad, when saving change the filetype to "All files (.)", then put in your filename of "Autorun.inf".

    [autorun] open=autorun.bat

  2. Do the same thing again with notepad, only this time create an "Autorun.bat" file. In this file we need to specify which folder on the CD the video is in, and possibly which program to open the file if you need a specific application to run it that isn't a default windows application.

    @echo off cd /d "%~dp0\MPEGAV" start NameOfYourVideoHere.mp4

In the script above %~dp0 refers to the drive that the .bat file is on.

  1. Place both autorun.inf and autorun.bat in the ROOT of your CD.

  2. Eject/Re-insert the CD and watch the magic happen.

Note based on my assumptions:

  1. If you do not want the video to play when simply inserting the disc into the tray... do not make the autorun.inf, only the autorun.bat and then simply double click it when you want the video to play.
  2. If you need another program to play the video, you will replace start NameOfYourVideoHere.mp4 with something like start "C:\folder\path2anyvideoapplicationhere" NameOfYourVideoHere.mp4

Lastly, next time you ask a question here, please provide more details. I'm just going out on a limb here.

shadow2020
  • 1,315
  • 1
  • 8
  • 30
  • I provided all the details. – ijka5844 Jul 18 '19 at 12:03
  • Not really, we still don't know which file is "the video". Judging by the fact you have not marked this as an answer, I assume it is not working yet. If it is please mark this as the answer for others. Regardless you have enough info to at least get this done without even having to try and research it on your own, like we all expect question askers to do. – shadow2020 Jul 18 '19 at 15:39