Page 1 of 1 1
Topic Options
#100643 - 2003-04-30 05:47 AM BAT files
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
I know that we can execute probably all DOS commands through BAT file, but is there a specific type of commands or language for BAT files [Razz] ? Thank you.
Top
#100644 - 2003-04-30 05:50 AM Re: BAT files
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doh, batch commands.
which actually are dos'es batch commands.

dunno what you mean as bat-files are dos batch-files.
they are to automate the writing of dos commands etc.
_________________________
!

download KiXnet

Top
#100645 - 2003-04-30 07:00 AM Re: BAT files
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Lonkero is right.. However, there are CMD Files too for NT-Class systems, but are really Batch in nature and structure.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#100646 - 2003-04-30 08:19 AM Re: BAT files
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
I think maybe what attiahia might be eluding to is the .cmd extension.

i.e. TEST.CMD will launch as a batch file.

@ECHO OFF
ECHO Hello %username%

Will execute by typing TEST.CMD at a command prompt and hitting the Enter key, or double clicking the file in Windows Explorer.

Top
#100647 - 2003-04-30 09:09 AM Re: BAT files
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mm...
I think he wanted to just make fun of us...
see his smilie [Embarrassed]
_________________________
!

download KiXnet

Top
#100648 - 2003-04-30 10:22 AM Re: BAT files
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
No sir.
Actually I feel happy that people like you with high level of thinking and experience act with funny questions like what I “some time” asked.
Thank you very much.

Top
#100649 - 2003-04-30 10:25 AM Re: BAT files
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Think there is an 'extended' "language" for it though ... saw once batch files were remarks were started with :: and there was a bit different syntax , not sure if the advantages are that much ... Anyone ?
_________________________



Top
#100650 - 2003-04-30 10:34 AM Re: BAT files
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
extended language, extended command-interpreter = needs install.
_________________________
!

download KiXnet

Top
#100651 - 2003-04-30 03:01 PM Re: BAT files
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4574
Loc: USA
The batch command interpreter in the Win9x series is no where near as powerful as the one built into NT based OSs.

The best book on shell scripting is "Windows NT Shell Scripting" by Tim Hill. Over the past few years/jobs I've owned about 3 or 4 copies. If it were not for KiXtart [Smile] , I'd still be using it.

I still believe there is one command in the shell scripting language that is far more powerful than just about any other, and to do it in KiXtart requires writing a book of functions (which I've done, but I don't like it)

for /f "tokens=##,delims=?,skip=##" %%f in ('some command') do something

With this command you can manipulate any dos style programs output to a variable, variables, to a text file, call another script, or call a subroutine withing the running script. It can also be used to construct input for another program. The pipe functions found in the UDF section come close but are still lacking in the flexibility of this command.

BUT, now that I am a KiXtart convert, I can live without it. [Wink]
_________________________
(... better days ahead)

Top
#100652 - 2003-04-30 03:51 PM Re: BAT files
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
There are a lot of really good (but somewhat dated) batfile sites on the web plus several nice freware editors plus compilers. It depends on what you are looking for. Just do a web search for "bat programming" or something simular & you will get a ton of excellent sites.
_________________________
Jack

Top
#100653 - 2003-05-05 07:47 AM Re: BAT files
JimRobinson Offline
Fresh Scripter

Registered: 2003-01-10
Posts: 42
Loc: Tempe, AZ
quote:
saw once batch files were remarks were started with ::
The :: remark syntax relies on the fact that %COMSPEC% sees the double colon as an invalid label and ignores the line completely, where REM'd lines are parsed just like any command line. So using :: can speed up execution of batch files with good commenting considerably.

And the best source for NT batch scripting is the alt.msdos.batch.nt newsgroup. If it can be done in batch someone there has done it.
_________________________
Jim
--------------------

Top
#100654 - 2003-05-05 08:18 AM Re: BAT files
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Good Batch file resources -

Rob Vanderwoude
http://www.robvanderwoude.com/

http://www.ss64.demon.co.uk/

Frank-Peter Shultze
http://www.fpschultze.de/index.html

Tom Lavedas
http://www.pressroom.com/~tglbatch/

Timo Salmi
http://www.uwasa.fi/~ts/http/tsfaq.html

http://www.uwasa.fi/~ts/http/http2.html#batch

Already stated:
http://groups.google.com/groups?oi=djq&as_ugroup=alt.msdos.batch (don't post NT-Relasted posts here)..

http://groups.google.com/groups?oi=djq&as_ugroup=alt.msdos.batch.nt

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#100655 - 2003-05-05 08:34 AM Re: BAT files
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

A real compiler for BAT/4DOS/NDOS is the Turbo Batch File Compiler. On the net
calling TBT323, TBT324 and TurboBAT.
More info see topic F14-591 Utility to map "flow" of cmd files ?


greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#100656 - 2003-05-05 09:03 AM Re: BAT files
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
And MORE

Batch File Command Reference for Windows 2000
http://www.labmice.net/articles/batchcmds.htm

INFORMATION ON BATCH FILES
http://www.computerhope.com/batch.htm

The Ancient Art of DOS Batch files
http://gatsby.tafe.tas.edu.au/batch/

Batfiles: The DOS batch file programming handbook & tutorial
http://home7.inet.tele.dk/batfiles/

Shell Scripts on the PC
http://gearbox.maem.umr.edu/~batch/

Batch Programming Stuff
http://www.infionline.net/~wtnewton/batch/index.html

DOS BATCH
http://lf.8k.com/BAT/BAT.HTM

BATCH FILE PROGRAMMING
http://members.aol.com/rick3in1/computer/batch.htm

Internal and Intrinsic Commands
http://www.maem.umr.edu/~batch/intrin1.htm

Batch File Programming Tutorial Series:
http://www.flash.net/~hoselton/pubs/pub_list.htm?

Batch files
http://www.bookcase.com/library/software/msdos.util.batch.html

Batch File Programming DOS
http://home.att.net/~gobruen/progs/dos_batch/dos_batch.html

How to Make DOS Menus
http://www.carleton.ca/~dmcfet/menu.html

How to Run a Batch File Before Logging on to Your Computer
http://support.microsoft.com/?kbid=243486

TurboBAT: Compiles DOS batch file to .COM file
http://www.simtel.net/pub/pd/40684.html

Top
#100657 - 2003-05-05 02:26 PM Re: BAT files
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Here is an interesting bit about BAT file compilers -

http://www.robvanderwoude.com/batutils.html

quote:

(Be aware, that compilers may not understand all the magic you are performing in batch files. Use standard commands only, if possible, and forget about undocumented DOS features.)

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1126 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.065 seconds in which 0.024 seconds were spent on a total of 11 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org