Creating .bat Files

DY357LXDY357LX Playing since day 1. Still can't Comm.England Join Date: 2002-10-27 Member: 1651Members, Constellation
<div class="IPBDescription">Multi-Purpose Really</div> Can anyone tell me if it's possible to create .bat (batch?)
files for moving/renaming files?

Here's alittle example that I want to try:

Moving my Doom 3 screenshots from
C:\Program Files\Doom 3\base\screenshots
to a folder such as
C:\Documents and Settings\Administrator\My Documents\My Pictures\Doom 3


Also, is it possible to create a .bat file to launching 2 .exe files
via 1 shortcut,
Lets say for example, that I wanted to launch X-Fire as well as
Steam when I ran the .bat file. How would I do that?


Now the final and most important .bat editing question.
I'm using the Omega Drivers and there's a util that allows you
to switch between the old OpenGL and new OpenGL files.
I'm happy with the new file for now but when launching XSI I'd
like to use the old file due to an increase in performance.

Upon launching the Util you get a DOS Prompt that asks you
to hit "C" , "N" or "X". (<b>C</b>ounter-Strike opengl - <b>N</b>ormal opengl or E<b>x</b>it.) You then get the standard return 0 prompt
(Press any key to continue...)



Can anyone help? I realise I may not have typed this as well
and as descriptive as possible, if there's anything you're unsure
of then feel free to ask and i'll explain it.

Comments

  • NEO_PhyteNEO_Phyte We need shirtgons&#33; Join Date: 2003-12-16 Member: 24453Members, Constellation
    edited September 2004
    Gah, i used to know how to make .bat files, but it has been too long now.

    sorry

    :edit:

    <!--QuoteBegin-screenshot moving+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (screenshot moving)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->if you know the dos command for move, try <command> <Screenshot dir>\*.<file extention> <destination folder>

    as i dont know the command or folders or file extentions for the SS, here is a better example

    move d:\games\doom3\base\screenshots\*.bmp c:\doom3pics

    assuming i got the command correct, that would move ALL bitmap images from the doom3 screenshot folder to c:\doom3pics<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    <!--QuoteBegin-running multiple .exe in one file+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (running multiple .exe in one file)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->im pretty sure this one can be done simply by setting the .bat file like in this example:

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->c:\x-fire\x-fire.exe
    c:\steam\steam.exe<!--c2--></td></tr></table><div class='postcolor'><!--ec2--><!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->

    as for the menu option, that is something that i really cant remember
  • ZaggyZaggy NullPointerException The Netherlands Join Date: 2003-12-10 Member: 24214Forum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester
    edited September 2004
    for renaming stuff

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->             old filename & extension   new filename & extension
    rename <filename>.<extension>  <filename>.<extension>
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    example
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->rename *.txt *.exe<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    this will rename all .txt files to .exe files in the current directory


    for copying:

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    cd C:\Documents and Settings\Administrator\My Documents\My Pictures\Doom 3
    copy C:\Program Files\Doom 3\base\screenshots\*.*
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    I'm not 100% sure about this, please experiment a bit.
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    Ah, for the copying, just put a .bat file with
    copy *.jpeg C:\Documents and Settings\Administrator\My Documents\My Pictures\Doom 3
    in the folder with your screenshots. Replace *.jpeg with whatever format the pictures are, obviously.
  • Seph_KimaraSeph_Kimara Join Date: 2003-08-10 Member: 19359Members
    Bant for scriptz0ring
  • SkulkBaitSkulkBait Join Date: 2003-02-11 Member: 13423Members
    <!--QuoteBegin-DY357LX+Sep 7 2004, 11:15 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DY357LX @ Sep 7 2004, 11:15 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Also, is it possible to create a .bat file to launching 2 .exe files
    via 1 shortcut,
    Lets say for example, that I wanted to launch X-Fire as well as
    Steam when I ran the .bat file. How would I do that?

    <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    AFAIK, you should just be able to create a .bat file with the two calls in it, one after the other, like this:

    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    C:\Program Files\Valve\Steam\steam.exe
    (or wherever it is)
    C:\Program Files\X-Fire\X-Fire.exe
    (or whatever it is)
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    Then just create a shortcut to this
  • DY357LXDY357LX Playing since day 1. Still can&#39;t Comm. England Join Date: 2002-10-27 Member: 1651Members, Constellation
    Interesting and helpful stuff thanks.
    Can anyone tell me about adding a delay?
    For example, a 30-40 second pause before
    launching the next .exe ?
  • SkulkBaitSkulkBait Join Date: 2003-02-11 Member: 13423Members
    edited September 2004
    <!--QuoteBegin-DY357LX+Sep 7 2004, 04:16 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (DY357LX @ Sep 7 2004, 04:16 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Interesting and helpful stuff thanks.
    Can anyone tell me about adding a delay?
    For example, a 30-40 second pause before
    launching the next .exe ? <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    You should be able to use <a href='ftp://ftp.sac.sk/pub/sac/utiltask/sleep_47.zip' target='_blank'>this</a> utility. Just drop that into the same folder as the .bat file, and in between the lines that call the two programs put "sleep for x" where x is the number of seconds you want it to wait.

    BTW
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Now the final and most important .bat editing question.
    I'm using the Omega Drivers and there's a util that allows you
    to switch between the old OpenGL and new OpenGL files.
    I'm happy with the new file for now but when launching XSI I'd
    like to use the old file due to an increase in performance.

    Upon launching the Util you get a DOS Prompt that asks you
    to hit "C" , "N" or "X". (Counter-Strike opengl - Normal opengl or Exit.) You then get the standard return 0 prompt
    (Press any key to continue...)
    <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    How do you want this to be changed?
  • SandstormSandstorm Join Date: 2003-09-25 Member: 21205Members
    If you want a specific program to use a specific DLL, just drop that specific DLL inside that program's folder. For example, I want to use the Beta 4.9 Catalyst OpenGL driver for Doom 3, but I don't want to use it for all my other OpenGL programs. I simply install the 4.8 Catalyst drivers, then extract just the Beta 4.9 Catalyst OpenGL driver into the Doom 3 directory.

    If you want something a little more flexible than BAT files, Windows has a powerful, built-in scripting feature called Windows Scripting Host. You have access to ActiveX objects through either VBScript or JScript. More specific information can be found <a href='http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28001169' target='_blank'>here</a>. If you have never used either, you'll want to start off with VBScript. VBScript is very similiar to Visual Basic.
Sign In or Register to comment.