How to create a Command Line "batch" file?
Results 1 to 7 of 7

Thread: How to create a Command Line "batch" file?

  1. #1
    Join Date
    Jan 1999
    Location
    St. Louis, Mo. USA
    Posts
    1,427

    How to create a Command Line "batch" file?

    can someone tell me the best way to create a file I can execute that would perform a Command Line task?

    .bat file?

    I need it to point to another drive and subfolder, then run an exe file (passing an argument.
    where do I need to put it so I can open start/run and type it it to run it?


    like this?

    runtest.bat

    cd c:\program files\Visual Pinball
    vp-launch6.exe "Eight Ball Deluxe.vpt"
    WinXP/98 dualboot - P4 2.4b 533FSB
    Asus P4PE/L MoBo
    512MB Corsair DDR PC2700
    HDD1 - 160gig Seagate HDD2 - 60gig Maxtor
    Antec SOHO File Server w/400 watt PSU

  2. #2
    Join Date
    Feb 2000
    Location
    Idaho Falls, Idaho, USA
    Posts
    18,425
    That looks like it should work. What happens when you try it?

  3. #3
    Join Date
    Mar 2009
    Location
    Arkham Asylum, Cell 13
    Posts
    11,809
    cd c:\program files\Visual Pinball
    Since there is a space in the folder name, you'd need to use quotes.

    cd "C:\Program Files\Visual Pinball"

  4. #4
    Join Date
    Jan 1999
    Location
    St. Louis, Mo. USA
    Posts
    1,427
    If I open Start\Run..
    and type c:\runtest

    or if I double click runtest.bat

    it opens a command prompt and then closes it so fast I can't read anything
    WinXP/98 dualboot - P4 2.4b 533FSB
    Asus P4PE/L MoBo
    512MB Corsair DDR PC2700
    HDD1 - 160gig Seagate HDD2 - 60gig Maxtor
    Antec SOHO File Server w/400 watt PSU

  5. #5
    Join Date
    Mar 2009
    Location
    Arkham Asylum, Cell 13
    Posts
    11,809
    you should open a command prompt first, then run the bat file from there.

    You could also add "pause" at the end (without quotes). Then you can see what ran and just press any key to close.

  6. #6
    Join Date
    Sep 1999
    Location
    Clearwater, Fl.
    Posts
    22,608
    Try:

    cd "C:\Program Files\Visual Pinball"
    vp-launch6.exe "Eight Ball Deluxe.vpt"

    save in notepad on the desktop as runtest.cmd
    If you're happy and you know it......it's your meds.

  7. #7
    jenae is offline Virtual PC Specialist!!!
    Join Date
    Jun 2002
    Location
    Sydney
    Posts
    2,702
    Hi, you need to right click on the .bat file and select "run as administrator" and since program files is inc you do need to enclose in " as suggested.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •