Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.bat files

Status
Not open for further replies.

cderow

Technical User
Jul 13, 2001
216
0
0
US
Hello all,
Does anyone know of a site or any documentation on how to create .bat files? This is something I would like to know as I haven't had much experience with creating them. Thanks for any suggestions. Do or do not, there is no try.
-Yoda
 
batch files are text files containing a series of instructions just like you would type from the keyboard one line at a time.
You create them with any of the editors or word processors with the understanding that they must be saved as text.
Figure out some job you do with several steps, then create a job.bat file containing the instructions, then run it.
Nothing like doing it for yourself.
Send an e-mail and I'll send you some samples. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
I have a DOS 6.2 manual, makes a nice doorstop.

If it is something simple maybe we can help you with it.

Or do you just want to play around? If you do not like my post feel free to point out your opinion or my errors.
 
Hey all,
I am just looking to play around with .bat files. Like I said before, it's something I'd like to learn more about. Do or do not, there is no try.
-Yoda
 
also look into .cmd files if you are in a win nt/2000 environment. theres a few more options to play with. have fun.
 
note that xp dumped the CHOICE command, but just copy it from a 9x PC and it'll work. My favorite commands are:

@echo off (always start your bat file with this)
choice
(to search for a string of text within a folder...)
for %f in (*.*) do find /i "text" %f >> result.txt
xp has some simple color control
9x requires you load ansi.sys in your config.sys file e.g.
device=c:\windows\command\ansi.sys
reboot - then you can use escape codes to control color e.g.
edit an exe file - copy/paste the left arrrow symbol to your batch file then look at your dos manual to format an escape sequence to control color. e.g. <-[1;32;44m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top