Really.. How do they work.. ?
as well can someone shed some light on the other obscure file extensions... ini .. etc..
Seahag
:confused:
Printable View
Really.. How do they work.. ?
as well can someone shed some light on the other obscure file extensions... ini .. etc..
Seahag
:confused:
Batch files, essentially, run a series of DOS commands for you so that you don't have to enter each command individually.
InI files are pretty much old school, although some folks still use them. They are text files that store application specific information.
A batch file is really just a list of DOS commands that execute in the order they are contained in the file.
Hack has quicker fingers!
Yes he does..How do the run.. are they like executibles?
jep
K.. confused
Do you use notepad?..
I do
they are not executables. The OS just reads the text file and executes each line in it.
yes youcan use notepad or any text editor.
now really confused.
I created a new notpad file.. named it test.bat.
Then put calc.exe in it.... saved it
now I click on it and the only thing that happens is notpad opens
arggggg... :confused:
You aren't going to be able to run a batch file from windows, and you aren't going to be able to start a windows program from a batch file.
Batch files run at the DOS prompt. If you want to run Calc.Exe from a program, it would have to be a windows program that you wrote.
thats incorrect hack. putting calc in the bat file will run windows calculator when you run the bat file.
Ok.. where do i run the Batch file?
just run it like you would anything else...double click on the bat file in explorer or run it in a Dos window..or use the Run on the Start menu
Holy Tamales Candor, I had no idea. I just did it (thinking, pooh and pooh...this isn't going to work), and lo and behold, up pops the calculator right smack dab in the middle of a DOS window. I'm not exactly sure what I'll ever do with this new found information, but it is interesting! :D
Notepad just opens??
What am I missing>?
did you give the file an extension of .bat or do you still have extension as .txt
I named it test.bat
but i went to look at it. It still has the test.bat.txt
How do I change that?
right click...choos rename then take out the .txt
Note that batch files do not necessarily contain DOS, just commands for the windows shell (which used to be DOS, but isn't anymore). There is a syntax to them - they're not unlike *nix shell scripts.
Make a batch file with:
call it p.batCode:ping %1
Then at a command prompt (cd to folder with p.bat in it):
Type: p 127.0.0.1
And see what happens.
(PS - I think SeaHag is saving with the wrong file extension. *.bat.txt)
Thanks.. :D
Really not that hard.. (duh)
What about the path.. where does it look for stuff.
do you have to include a path string?
you would do it like you would in a dos window.
for example here would be the lines of a bat file to change to the c:\hello\bye directory
c:
cd hello\bye
Strange..
why can i just do calc.exe.. (i know that it is in the windows dir ?)
This is becomming very clear though.
how adaptible is scripthing to batch files...
What eles can you do with batch files?
That is all
Thanks everyone !!!
:cool:
because calc is in the windows default path so it knows where to look already.
You cannot script inside a bat file(although technically a bat file is scripting), you could use a bat file to run a vbs script file if you wish....the same way you run an exe.
If you have it is your mind that you can program an application with a bat file, you need to scrap that idea...all it does is run dos command lines.
Enough said..
Thanks