• home
  • forum
  • my
  • kt
  • download
  • Batch Files : Creating .bat files for CD

    Author: 2007-06-09 14:03:16 From:

    Batch files are useful for all kinds of different tasks. In this two part tutorial we will firstly look at how you make a batch file to 'explore a cd'. Then in the second installment we will look at how we can employ a batch file to open a text file with the default program'. After reading these tutorials you will be able to experiment with batch files and create your own. So let's begin.

    To create a .bat that will explore a directory:

    1. Open up Notepad and type in:

    start
    @ECHO OFF
    explorer D:\
    

    The 'explorer D:\' line tells the program to start windows explorer and browse the D:\ drive, you can always specify a directory to explore also eg. D:\images\mypic etc, for any directory you want to explore.

    2. Save type as an "All Files (*.*)" with the filename of your choice ending in .bat, I chose mydoc.bat.

    3. In your flash movie you can run this program by putting the following code into a symbol.

    On (Release)
     FS Command ("Exec", "mydoc.bat")
    End On
    Replacing mydoc.bat with the filename you chose in step 2.

    4. Right click on your .bat file and choose properties. In here, click over to the 'program' tab and put a check in the "close on exit" box, this will close the program window when it finishes executing, and will save your user a bit of trouble. Click OK and you will now see a .pif file in the same directory as your .bat.

    5. Burn your cd with your projector .exe file, your .bat file and the .pif file in the root directory.

    Voila, when you click your button, the .bat program will run and explore the directory.

    Now let us look at part two, Batch Files : Opening Text Files using a .bat file.

    Other Reading:

    • Read our tutorial on manipulating flash projector files
    • Read up on creating Autorun CDs for projectors

    » Level Intermediate

    Added: : 2000-03-08
    Rating: 7.04 Votes: 58
    Hits: 10933
    » Author
    No Information Given
    » Download
    Download the files used in this tutorial.
    Download (0 kb)

    discuss this topic to forum

    relation tutorial

    No information

    Category

      3D (36)
      Math Physics (18)
      3rd Party (10)
      Navigation (70)
      Actionscripting (228)
      Optimization (17)
      Animation (166)
      Projector (11)
      Audio (54)
      Special Effects (170)
      Backend (26)
      Text Effects (92)
      Drawing (34)
      Tips and Techniques (58)
      Dynamic Content (38)
      Tricks (8)
      Games (114)
      Utilities (24)
      Getting Started (99)
      Video (59)
      Interactivity (48)
      Web Design (37)

    New

    Hot