Creating .bat Files
DY357LX
Playing since day 1. Still can't Comm.England Join Date: 2002-10-27 Member: 1651Members, Constellation
in Off-Topic
<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.
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
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
<!--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.
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.
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
Can anyone tell me about adding a delay?
For example, a 30-40 second pause before
launching the next .exe ?
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?
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.