Does anyone know how to make a batch (*.bat) file?

Discussion in 'Windows Desktop Systems' started by SaintKaden, Aug 24, 2002.

  1. SaintKaden

    SaintKaden Guest

    I wanna make a batch file that will rename a particular file and execute another, can anyone help?
     
  2. Sazar

    Sazar F@H - Is it in you? Staff Member Political User Folding Team

    Messages:
    14,905
    Location:
    Between Austin and Tampa
    do you know any batch programming?

    its not even programming... just execution of instructions one after the next...
     
  3. Sazar

    Sazar F@H - Is it in you? Staff Member Political User Folding Team

    Messages:
    14,905
    Location:
    Between Austin and Tampa
    you will hve to put it in the sequence you want it to run or rather execute the commands..

    basically you will go something like the following..
    please remove the [ ] square brackets though :)

    echo off
    ren [insert filename to rename] [insert filename you want it to be]
    [application filename]

    thats it

    the application has to be something that will run.. such as a .bat or a .exe file... else it will not work..

    you don't need the echo off or on thinger...

    thats it
     
  4. SaintKaden

    SaintKaden Guest

    what comand closes the command window afterwards?
     
  5. Sazar

    Sazar F@H - Is it in you? Staff Member Political User Folding Team

    Messages:
    14,905
    Location:
    Between Austin and Tampa
    what window ?

    one bactch file completes executing all commands... it should close... unless there is a window for a file that you are using..

    what exactly are you trying to do anyhoo :)

    post the progs and perhaps a .bat file can be posted to help you.. at least the text for it ..
     
  6. SaintKaden

    SaintKaden Guest

    well you see I have this game called "ut2003" (i'm sure you've heard of it) that requires a particular *.dll file when I'm playing it in multiplayer and another when you play singleplayer.

    Now they are both the same file, only one is tweaked to enable multiplayer functions while disabling the karma engine which looks very cool...

    So with your help, what I set out to do was create two shortcuts one for a singleplayer and another for multiplayer. Both linked to *.bat files containg the following:

    MP - bat

    @echo off
    copy Engine_nokarma.dll Engine.dll
    ut2003.exe

    SP - bat

    @echo off
    copy Engine_karma.dll Engine.dll
    ut2003.exe

    now aside from the bat files I also threw in copies of the file named as follows:

    Engine_karma.dll
    Engine_nokarma.dll

    this works, but the command window that pops up, stays up even after I quit the game, I mean it closes but only after a while...

    Is there a command to kill that windows instantly?
     
  7. Sazar

    Sazar F@H - Is it in you? Staff Member Political User Folding Team

    Messages:
    14,905
    Location:
    Between Austin and Tampa
    SORRY... not sure about that... normally when I made batch files back in the days of win95 and win98 I had no problems with the comman window closing...

    I dunno.. try putting and END or something.. can also look up some sites concerning batch files... and you are on your way..
     
  8. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    exit ought to do the trick
     
  9. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    There is a checkbox in the .bat file properties if you want to close the windows when you quit the game.