Batch Language

Batch Language

  • Submitted By: bibo
  • Date Submitted: 01/25/2009 12:57 AM
  • Category: Technology
  • Words: 9883
  • Page: 40
  • Views: 513

A collection of batch language enhancers in batch language
Collected by Dirk van Deun
Programs and longer quotations (re)published with permission
"In der Beschraenkung zeigt sich erst der Meister." (Goethe)
If you want extra information, if you have found a bug or
developed a better routine, mail me at dvandeun at
Date of last revision: June 7, 1996


Not all batch files in this collection are easy too understand for the
beginner. If you are not already a batch file fanatic, it might be better
to read first, which
contains quite a few useful digressions which I did not repeat here.
However, all batch files in this text can be understood with the help of
your MS-DOS manual, if you know these three undocumented or barely
documented facts:

1. Starting a line with :: has the same function as starting a line with
REM, only it executes faster, because REM is a DOS command, and DOS
preprocesses it (interpreting >, file creates a 0 byte
file, and :: > file doesn't.

2. FOR %a IN (/ABCD) is functionally equivalent with FOR %a IN (A BCD):
in a FOR argument DOS splits a word preceded with a slash in two parts:
the first letter, and the rest. If you do not see the use of this, note
that the slash can also be used with variables and command line
parameters: in FOR %a IN (/%VAR%), %VAR% is interpreted first, and then
the first...

Similar Essays