In the 80's I wrote extensions to WHAT.EXE a simple DOS batch extender that
would get stuff and put it in the environment and exit code. It helped make
DOS batch a little more bearable without learning a new batch language. I
had to rewrite it to handle newer DOS versions (old methods of finding the
master environment and updating using MASM didn't work anymore) and added
several commands. Many no longer work as of Windows ME. Most of these
functions are incorporated now into the CMD command processor's extended
shell commands. I tested WHAT.EXE in the WinXP CMD processor and it can't
properly update the master environment table. But you can run 
COMMAND.COM
and there it works.
                         WHAT V1.51- Batch file enhancer
Command                 Purpose     Argument   Environ     Exit        Extended
---------               -------     --------   -------     ----        ------
C[E] ["prompt"] [chars] Get         Allowable  Character   Character   Echo
                         character   characters
G[E] ["prompt"] [chars] Get         Allowable  Character   Character   Echo
                         character   characters
(G option gives up after a while and returns TO for TIMEOUT.)
S[E] ["prompt"]         Get string  None       String      Length      Echo
D[E]                    Check DOS   None       Major       (Major*10)  Minor
                                                version     +Minor      version
E[E]                    Get environ None       Bytes       Bytes/10    10 bytes
                         bytes left                         bytes       in exit
F[E] filespec           Get file    Filespec   Kilobytes   Ks/10Ks     10Ks in
                         size                     (255=directory)       exit
Command                 Purpose     Argument   Environ     Exit        Extended
---------               -------     --------   -------     ----        ------
K[E] [driveletter]      Get disk    Drive      Kilobytes   Ks/10Ks     10Ks in
                         space                                          exit
M[E]                    Check       None       Kilobytes   Ks/10Ks     10Ks in
                         memory                                         exit
P[E]                    Check for   n =1-4,    Status      1=yes,0=no  Verbal
                         printer     LPTn:      message     (is ready)  Message
V [number]              Get/Set     New mode   Current or  Current or  None
                         video mode             last mode   last mode
7                       Check for   None       1=yes,0=no  1=yes,0=no  None
                         coprocessor
Command                 Purpose     Argument   Environ     Exit        Extended
---------               -------     --------   -------     ----        ------
A                       Check for   None       1=yes,0=no  1=yes,0=no  None
                         ANSI driver
Y[E]                    Get current None       Directory   Level/Drive Drive
                         directory
T[E]                    Get Time    None       HH:MM       Nothing     12 hour
                         of day                                         format
X[E]                    Get Date    None       mm-dd-yy    Nothing     yy-mm-dd
W[E]                    Get Day     None       Day Name    0-7 for     Abbrev.
                         of week                            Sun-Sat
B[E]                    Get File    Filename   mm-dd-yy    Nothing     yy-mm-dd
                         Date
At 04:47 PM 2/3/2006 -0800, you wrote:
 Does anyone have any favorites when it comes to
extending MS-DOS's batch
language?  Ideally, I'd like a facility to do simple arithmetic and looping
and be able to parse filenames into their components a la 'C'
"splitpath".
Long file name support would be a bonus.
Anyone have any candidates?
Cheers,
Chuck 
[Alcohol] You can't be a real country unless you have a beer and an
airline - it helps if you have some kind of a football team, or some
nuclear weapons, but at the very least you need a beer.       --Frank
Zappa
--... ...--  -.. .  -. ----. --.- --.- -...
tpeters at 
nospam.mixcom.com   (remove "nospam") N9QQB (amateur radio)
"HEY YOU" (loud shouting)  WEB ADDRESS http//www.mixweb.com/tpeters
43? 7' 17.2" N by 88? 6' 28.9" W,  Elevation 815',  Grid Square
EN53wc
WAN/LAN/Telcom Analyst, Tech Writer, MCP, CCNA, Registered Linux User 385531