Category : Batch File Utilities - mostly for DOS
Archive   : ULTRA60.ZIP
Filename : ULTENV.DOC

 
Output of file : ULTENV.DOC contained in archive : ULTRA60.ZIP






±ÛÛ ±ÛÛ ±ÛÛ ±ÛÛÛÛÛÛÛÛ ±ÛÛÛÛÛÛÛ ±ÛÛÛÛÛÛÛ
±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº
±ÛÛ ±ÛÛ ±ÛÛ ±ÛÛ ±ÛÛÛÛÛÛÛ ±ÛÛÛÛÛÛÛ TOOLBOX 6.0
±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº ±Ûº (c) 1993
±ÛÛÛÛÛÛÛ ±ÛÛÛÛÛÛÛ ±ÛÛ ±ÛÛ ±ÛÛÛ ±ÛÛ ±ÛÛ


Over 200 Functions to assist you in
batch files, or just everyday use


(PART TWO OF THE ULT SERIES)






New stuff in this version:

/4DOS is 4dos installed?
/DBLSPC is DoubleSpace (Dos 6) installed?
/DRVSYS is Drvsys installed?
/DOSKEY is Doskey installed?
/NLSFUNC is Nlsfunc installed?
/QRTDECK is a QuarterDeck product installed (like QEMM386.SYS)
/SMRTDRV is Smrtdrv.sys installed?
/PARK park the hard disk
/PRANK play a Prank, and create 25 suprise directories
/PLAYCUR play around with the cursor size
/WRITE write one of 36 small .COM files to disk

ULTVU.EXE view any archive file!

Includes: HA,HAP,SQZ,PKZIP,ARJ,LHA,ARC,LARC,LHARC,ZOO,PAK



Is ULT.EXE too big to use? You can't stick a 100K file in your batch
files, right?!

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Try: ULTENV /WRITE ( a menu will pop up ) ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

Creates one of 36 cool little .COM files for your batch files. Each
one is under 1K, and does functions that ULT does.

ALARM.COM Plays an alarm sound on the PC Speaker
AMPM.COM Determine AM/PM time
RETURNS: 1 if AM 2 if PM
BEEP.COM Beeps on the speaker
CBOOT.COM Cold boot computer
DOSVER.COM Get DOS version (major)
RETURNS: dos version
ERRLOCK.COM Fake hard disk error and lock computer
GETPAGE.COM Get current video page
RETURNS: video page #
MAXRATE.COM Set keyboard rate to maximum
NOWDAY.COM Determine day of month
RETURNS: day of the month
NOWHOUR.COM Determine current hour
RETURNS: current hour (military time.. 0-23)
NOWMONTH.COM Determine current month
RETURNS: # of current month
PRNCR.COM Send a Carriage Return to Printer
PRNFF.COM Send a Form Feed to Printer
PRNLF.COM Send a Line Feed to Printer
SETPAGE.COM Set video page
USAGE: SETPAGE # (whereas # is page number)
WBOOT.COM Warm boot computer
WEEKDAY.COM Determine day of the week
RETURNS: 0 = Sunday, 1 = Monday, 2 = Tuesday, etc...

----------------------- EQUIPMENT DETERMINATION --------------------

GAMEPORT.COM Determine if GAME PORT installed
I_4DOS.COM Determine if 4DOS installed
I_ANSI.COM Determine if ANSI.SYS installed
I_APPEND.COM Determine if APPEND installed
I_ASSIGN.COM Determine if ASSIGN installed
I_CBREAK.COM Determine if CTRL-BREAK checking is active
I_DBLSPC.COM Determine if DOUBLE SPACE (Dos 6) installed
I_DESQV.COM Determine if DESQVIEW installed
I_DOSKEY.COM Determine if DOSKEY (Dos 5+) installed
I_DRVSYS.COM Determine if DRIVER.SYS installed
I_GRPHIC.COM Determine if GRAPHICS.COM installed
I_INWIN.COM Determine if WINDOWS is running
I_MOUSE.COM Determine if MOUSE driver installed
I_NLSFUN.COM Determine if NLSFUNC.COM installed
I_PRINT.COM Determine if PRINT.COM installed
I_QRTDEK.COM Determine if QUARTERDECK product is installed
I_SHARE.COM Determine if SHARE.COM installed
I_SMTDRV.COM Determine if SMARTDRV.SYS installed
I_VERIFY.COM Determine if VERIFY checking is active

RETURNS: 1 if installed
0 if not installed






ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ THE ULTIMATE ARCHIVE LISTER ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

Do you have LOTS of archived files? ULTVU.EXE lists their contents,
quick and easily.

NOTE: This is FASTER than any other archive lister!

Includes: HA,HAP,SQZ,PKZIP,ARJ,LHA,ARC,LARC,LHARC,ZOO,PAK


USAGE: ULTVU [filespec]

for example: ULTVU *.zip
ULTVU files.zip





























=========== OPTIONS ========================================================


/#CHAR COUNT CHARACTERS IN FILE

Counts number of characters in a file. Places number
in ULT environmental variable (usually, the number is
too large to place in the errorlevel).

RETURNS: number of chars in file (if not more than 255)
99 error opening file

EX: ULTENV /#CHAR this.txt



/#LINE COUNT LINES IN A FILE

Counts number of lines in a file. Must be a text file.

RETURNS: number of lines in file (if not more than 255)
99 error opening file

EX: ULTENV /#LINE this.txt



/#WORD COUNTS WORDS IN A FILE

Counts number of words in a file. Must be a text file.

RETURNS: number of words in file (if not more than 255)
99 error opening file

EX: ULTENV /#WORD this.txt



/32CRC CALCULATES THE 32 bit CRC OF A FILE

This uses a 32-BIT lookup table to find the CRC
of a file. This can be used to check for viruses,
or find out if the file has been altered.
The CRC is placed in the ULT environmental variable.

EX: ULTENV /32CRC list.com
if %ULT%==239845 goto file_ok
goto not_ok
:file_ok
echo List.com passes viruses test, continuing...
exit
:not_ok
echo PROBLEM WITH LIST.COM! Check file.



/4DOS IS 4dos INSTALLED?

Determines if 4DOS is currently being used

RETURNS: 1 4dos is installed
0 none found

EX: ULTENV /4DOS




/ADD ADD TWO NUMBERS

This simply adds two numbers on the command line.
The result is placed in ULT environmental variable,
and placed in the DOS errorlevel (if the result is
less than 255).

RETURNS: result

EX: ULTENV /ADD 3 8
ULTENV /ADD 14 93



/ARCID IDENTIFY AN ARCHIVE

This identifies an archive (PAK, ZOO, PKZIP, etc),
returning the type in the ULT environmental variable
and the errorlevel.

Archive Type ErrorLevel ULT Variable
------------------------------------------------------
UNKNOWN 0 Unknown
.ZIP 1 PKZIP
.ARJ 2 ARJ
.LZH 3 LHA
.SQZ 4 SQUEEZE
.HAP 5 HAP
.ARC 6 ARC
.PAK 7 PAK
.ZOO 8 ZOO
.HA 9 HA
.AR7 10 AR7
.DWC 11 DWC
.SDN 12 PAK
.HYP 13 HYPER

EX: for %j in (*.*) do ULTENV /ARCID %j



/BEEP SOUNDS A BEEP ON THE SPEAKER

Real simple: makes a beep

EX: ULTENV /BEEP



/BIGFILE FIND THE BIGGEST FILE

Find the largest file in a directory, and places it
in the ULT environmental variable.

RETURNS: number of files found

EX: ULTENV /BIGFILE



/BOOTDR GET BOOT DRIVE

This returns the drive that was DOS was booted from.
Many times, a user boots from drive A: instead of a
hard drive.

RETURNS: 1 for drive A:
2 for drive B:
3 for drive C:
4 for drive D:

etc...

EX: ULTENV /BOOTDR



/BYTECLU GETS BYTES PER CLUSTER FOR CURRENT DRIVE

This returns the bytes/cluster for the current
disk drive. Consult your DOS manual for information
about disk drives, or a technical manual.

RETURNS: bytes/cluster of disk

EX: ULTENV /BYTECLU



/CLEAN GRAPHICALLY CLEAN DRIVE

Cleans drive by reading disk repeatedly.

EX: ULTENV /CLEAN b:
ULTENV /CLEAN a:



/CLRECHO ECHO MESSAGE WITH COLOR

This shows a message on the screen using color!
Many times, you don't want to use /PUTS because
it requires screen coordinates. If you simply
want to print a message at the current line, you
can use this.

whereas color = 0 BLACK
1 BLUE
2 GREEN
3 CYAN
4 RED
5 MAGENTA
6 BROWN
7 LTGRAY
8 DKGRAY
9 LTBLUE
10 LTGREEN
11 LTCYAN
12 LTRED
13 LTMAGENTA
14 YELLOW
15 WHITE

EX: ULTENV /CLRECHO "This is a colorful message!" 14
ULTENV /CLRECHO "Place the disk in drive A:" 5



/CLS1-8 CLEAR SCREEN EFFECTS 1 - 8

These clear text screen using a variety of cool effects.
Experiment with them to see the cool zaps, fades and
other usages.

EX: ULTENV /CLS1
ULTENV /CLS2
ULTENV /CLS3
ULTENV /CLS4
ULTENV /CLS5
ULTENV /CLS6
ULTENV /CLS7
ULTENV /CLS8



/COLOR CHANGE DOS COLORS

This changes the screen color using ANSI.SYS. You must have
ANSI.SYS installed to use this (for more information on
ANSI.SYS, consult your DOS manual).
This also changes your prompt to: $p$g. If you have a
customized prompt, you may want to avoid this option.

USAGE: ULTENV /COLOR foreground background

whereas colors can be: BLACK
RED
GREEN
BROWN
BLUE
PURPLE
CYAN
WHITE

EX: ULTENV /COLOR BLACK WHITE
changes color to black on white.

ULTENV /COLOR CYAN BLACK
changes color to cyan on black.



/CR WAIT FOR THE CARRIAGE RETURN KEY

Pauses the computer until the RETURN key is pressed. Any other
key does nothing. Once the return key has been pressed, the
program exits normally.

EX: ULTENV /CR



/DIRLST SHOWS A SIX COLUMN DIRECTORY DISPLAY

Displays an unsorted, six column directory. The typical
output looks like this:

VGALIB .LIBÝTURBOC .CFGÝTHELP .CFGÝULTENV .DOCÝDPMI16BI.OVLÝDPMIINST.EXEÝ
DPMILOAD.EXEÝDPMIMEM .DLLÝDPMIRES .EXEÝSFX .C ÝMATH ÝPRJ2MAK .EXEÝ
TLIB .EXEÝTOUCH .COMÝTRIGRAPH.EXEÝTCHELP .TCHÝTHELP .COMÝFUCK Ý
PRJCFG .EXEÝPRJCNVT .EXEÝTASM2MSG.EXEÝUU ÝULT4_C .ZIPÝTEMC .EXEÝ
TRANCOPY.EXEÝCPP .EXEÝMAKE .EXEÝMAKER .EXEÝOBJXREF .COMÝTCC .EXEÝ

Yes, I know, it is severely packed, but convenient and saves
much space on the command line.

EX: ULTENV /DIRLST



/DIRPOP RETRIEVE DIRECTORY FROM ENVIRONMENT

This function retrieves the directory in the ULTDIR environmental
variable and changes to it. This would be useful if you changed
to a directory, then wanted to return where you started.

You could say: ULTENV /DIRPUSH
cd\wp51\data
wp.exe
ULTENV /DIRPOP

EX: ULTENV /DIRPOP



/DIRPUSH STORE DIRECTORY TO ENVIRONMENT

This function places the current directory in the ULTDIR
environmental variable. This would be useful if you changed
to a directory, then wanted to return where you started.

You could say: ULTENV /DIRPUSH
cd\wp51\data
wp.exe
ULTENV /DIRPOP

EX: ULTENV /DIRPUSH



/DISKFREE PLACES THE FREE SPACE OF CURRENT DISK IN ENVIRONMENT

Puts current disk free space in ULT environmental variable.

EX: ULTENV /DISKFREE



/DBLSPC IS DOUBLESPACE (Dos 6) INSTALLED?

Determines if DOUBLESPACE Disk compression is currently being used

RETURNS: 1 DoubleSpace is installed
0 none found

EX: ULTENV /DBLSPC



/DOSDATE SETS THE DOS DATE

If you use DATE in a batch file, the user must manually set
the damn date himself. This allows a batch file to independently
set the DOS date without stopping for user input.

USAGE: ULTENV /DOSDATE month day year

EX: ULTENV /DOSDATE 4 15 1993
ULTENV /DOSDATE 12 25 1998



/DOSKEY IS DOSKEY INSTALLED?

Determines if DOSKEY is currently being used

RETURNS: 1 Doskey is installed
0 none found

EX: ULTENV /DOSKEY



/DOSTIME SETS THE DOS TIME

If you use TIME in a batch file, the user must manually set
the damn time himself. This allows a batch file to independently
set the DOS time without stopping for user input.
NOTE: Uses military time (24 clock)

USAGE: ULTENV /DOSTIME hour minute

EX: ULTENV /DOSTIME 4 15 (4:15 am)
ULTENV /DOSTIME 12 0 (12:00 noon)
ULTENV /DOSTIME 23 25 (11:25 pm)



/DRYSYS IS DRVSYS INSTALLED?

Determines if DRVSYS is currently being used

RETURNS: 1 Drysys is installed
0 none found

EX: ULTENV /DRVSYS




/DUMP PLACES CURRENT ENVIRONMENT INTO BATCH FILE

This is really cool! It grabs all of your current
environmental variables and puts them in a batch file
for later use. That way, if you accidentally change
a variable, or a program screws up your environment,
you can return it to normal by typing: DUMP.BAT

USAGE: ULTENV /DUMP

Your current environment is now in a file named DUMP.BAT,
which looks similar to:

@SET COMSPEC=C:\!\4DOS\4DOS.COM
@SET CMDLINE=unerase.exe
@SET PATH=C:\!\UTILS;\!\DOS;\TC\BIN;\!\ND
@SET PM=ndd,asc,rew
@SET PROMPT=$e[0;30;47m$p$g

Now to restore this environment, type: DUMP, and all the
variables are set back to normal. Trust me, this is a
lifesaver when you mess up a variable or two!

EX: ULTENV /DUMP



/ECHO PRINTS A BLANK LINE

The DOS ECHO command does not allow you to print a
blank line. This simply allows you to.

EX: ULTENV /ECHO



/EMSFREE PLACES THE FREE EMS AMOUNT INTO ENVIRONMENT

Puts current free EMS in ULT environmental variable.
Be sure to check the existence of ems before getting
this number. If called, and no EMS manager is present, the
results of this function are unpredictable.

EX: ULTENV /EMSFREE



/EMSTOT PLACES THE EMS TOTAL INTO ENVIRONMENT

Puts current total EMS in ULT environmental variable.
Be sure to check the existence of ems before getting
this number. If called, and no EMS manager is present, the
results of this function are unpredictable.

EX: ULTENV /EMSTOT



/EXPMEM PLACES THE EXPANDED MEMORY TOTAL INTO ENVIRONMENT

Puts current total expanded memory in ULT environmental variable.
Be sure to check the existence of ems before getting
this number. If called, and no expanded memory manager is present,

the results of this function are unpredictable.

EX: ULTENV /EXPMEM




/EXTMEM PLACES THE EXTENDED MEMORY TOTAL INTO ENVIRONMENT

Puts current total expanded memory in ULT environmental variable.
Be sure to check the existence of ems before getting
this number. If called, and no extended memory manager is present,
the results of this function are unpredictable.

EX: ULTENV /EXTMEM



/FILEFIT WILL A FILE FIT INTO DISK DRIVE?

When copying a file using your batch file, you must first
find out if the file you want to copy will fit on the
target drive. This merely tells you yes or no.

USAGE: ULTENV /FILEFIT file drive

whereas drive = 1 A:
2 B:
3 C:
4 D: etc....

RETURNS: 1 File will fit
0 Not enough space on target drive

EX: echo Attempting to copy LIST.COM onto C: drive
ULTENV /FILEFIT list.com 3
if errorlevel 1 goto file_ok
if errorlevel 0 goto too_big



/FILSIZ GET FILE(s) SIZE

This gathers the size of a file (or several files, and
totals them into the ULT environmental variable.

EX: ULTENV /FILSIZ list.com (places the size of list.com in ULT)
ULTENV /FILSIZ *.doc (places the size of all .DOC files in ULT)



/GETPAGE GET CURRENT VIDEO PAGE NUMBER

Exactly like it says, get the current video page number.
To alter the video page, use ULT /PAGE.

RETURNS: Page number



/GETSTR GET A STRING FROM THE KEYBOARD

This gets a string (no echo) from the user, and places it in
the ULT environmental variable.
Since the input does not echo to the screen, this can also be
used for password input. Or you can combine WINDOWS (using
ULT /BOX option) and ULT /PUTS for a professional look.

EX: echo Enter Password:
ULTENV /GETSTR
IF %ULT% == "MYPASSWORD" goto correct_password
goto bad_password



/GETVOL GET VOLUME LABEL NAME

This gets the current disk drive's volume label. The name
is then placed in the ULT environmental variable.

RETURNS: 99 no volume label found

EX: ULTENV /GETVOL



/GOTO GOTO SCREEN COORDINATES

Moves the cursor to different screen coordinates. Effectively,
this moves the current row, since once the program exits,
the cursor automatically is reset to column ZERO.

USAGE: ULTENV /GOTO x y

EX: ULTENV /GOTO 0 13 (moves to column 0, row 13)



/GRAPHIC PLACES GRAPHIC ADAPTER IN THE ENVIRONMENT

This gets the current video adapter, and places the result
in the ULT environmental variable. The numerical value is
also placed in the DOS errorlevel.

ERRORLEVEL ULT Variable
--------------------------------------------------------
0 No video card
1 Monochrome
2 EGA in Monochrome mode
3 MCGA in Monochrome mode
4 VGA in Monochrome mode
5 Hercules
6 Hercules Plus
7 Hercules InColor
8 CGA
9 EGA
10 MCGA
11 VGA

EX: ULTENV /GRAPHIC
if %ULT% == "CGA" goto cga_video
if %ULT% == "EGA" goto ega_video
if %ULT% == "VGA" goto vga_video



/HID&SYS DISPLAY HIDDEN AND SYSTEM FILES

Shows all the hidden and system files in the current directory.
The ULT environmental variable is then set to the total size
of the directory, and the ERRORLEVEL is set to the total
hidden/system files found.

RETURNS: Total hidden/system files in current directory

EX: ULTENV /HID&SYS



/HYPER IS HYPERDISK INSTALLED?

HYPERDISK is a popular Shareware disk cache program.
NOTE: Hyperdisk is also responsible for my disk crash
that made me lose 5,000 files in 374 directories.
The damn thing decided to write over both copies
of my File Allocation Table. In my opinion, stay
away from this HYPERDISK program, and purchase
another commercial cache utility instead!

RETURNS: 1 Hyperdisk is installed
0 not found

EX: ULTENV /HYPER



/ISDIR IS DIRECTORY IN PATH?

This searches the current PATH for a name. You can use this
to determine if a directory is on the path, or if any other
name is on there. The case of the letters does not matter,
since both the name you specified and the path are capitalized.

USAGE: ULTENV /ISDIR name

RETURNS: 1 directory found!
0 name not found

EX: ULTENV /ISDIR c:\utils
ULTENV /ISDIR \wp51



/KFF FORM FEED REMOVER

Do you have any files you want printed, but want all those
pesky form feeds removed? This does the job perfectly, without
actually altering the original file.
Just type: ULT /KFF infile outfile

The outfile will contain no form feeds.

EX: ULTENV /KFF forms.doc forms2.doc
ULTENV /KFF wp.doc wp2.doc



/MAXDRIVE NUMBER OF LOGICAL DRIVES

This returns the number of logical drives on your computer.

RETURNS: Number of logical drives

EX: ULTENV /MAXDRIVE



/MEMORY SHOWS A DUMP OF THE MEMORY

This displays information about currently loaded programs
in the memory.

EX: ULTENV /MEMORY



/MODEM SEND A STRING TO THE MODEM

Sends a message to the modem. The modem is first initialized
to the COM port you specify, then the message you specified
is sent into the port, and a reply echoed to the command line.
The program then waits for a key to be pressed, then exits.

In summary: 1) type in ULTENV /MODEM then port number,
then the message
2) wait for a response from the modem
3) press any key to exit

USAGE: ULTENV /MODEM port message

RETURNS: Value of key pressed (see ULT /GETKEY for values)

EX: ULTENV /MODEM 1 "AT D T 555-3423" (dials a phone number on COM 1)
ULTENV /MODEM 3 "AT" (opens COM 3, then should return "OK")



/MUL MULTIPLY TWO NUMBERS

This multiplies two numbers, then places the result in the ULT
environmental variable, and the errorlevel (if the number is too
big, errorlevel will be set to 255).

USAGE: ULTENV /MUL number number

RETURNS: answer (if not over 255)

EX: ULTENV /MUL 25 84 (multiplies 25 X 84, and sets ULT to the answer)



/NLSFUNC IS NLSFUNC INSTALLED?

Determines if NLSFUNC is currently being used

RETURNS: 1 Nlsfunc is installed
0 none found

EX: ULTENV /NLSFUNC



/NUMCLU NUMBER OF CLUSTERS FOR CURRENT DRIVE

Returns the number of clusters for the current disk drive. For more
information about clusters/bytes/sectors, consult a technical
manual.

RETURNS: number of clusters

EX: ULTENV /NUMCLU



/OVERFILL FILL THE SCREEN WITH A STRING

This clears the screen to light gray, then prints the string
specified 200 times, each with a different color.
You really have to experiment with this one to fully
understand.

EX: ULTENV /OVERFILL "Dave's Program"
ULTENV /OVERFILL "Cool Batch File"



/PARK PARK THE HARD DISK

Park the hard disk head in a place where no data is. This is
useful if you plan to move the computer, to avoid damaging
data on the disk by having the read/write head scrape across it.

EX: ULTENV /PARK



/PICKFILE CHOOSE A FILE AND PUT IT IN ENVIRONMENT

This prints a window full of filenames on the screen, then
allows the user to pick one. Once chosen, the filename
and directory will be placed in the ULT environmental
variable.

EX: ULTENV /PICKFILE
echo You chose to copy %ULT%, correct?



/PLAYCUR PLAY WITH THE CURSOR (TO SEE DIFFERENT SIZES)

You can play with the cursor size by playing with the up/down
arrows and adjusting the size.

EX: ULTENV /PLAYCUR



/PRANK PLAY A PRANK (write 25 directories on the disk)

Creates 25 randomly named subdirectories on the disk. Although
this is harmless, I recommend trying it on an empty floppy disk
to see exactly what it does. Your friend will spend about 20
minutes searching and deleting these directory trees!

NOTE: This may cause slight fragmentation, and lost clusters.
To fix these, use CHKDSK.EXE

EX: ULTENV /PRANK



/PRNAVAIL CHECKS TO SEE IF A PRINTER IS CONNECTED (LPT1)

Many times, you may want to find out if the user has a
printer hooked up and on line. This allows you to
check.

RETURNS: 1 printer is ready/on-line
0 no printer available

EX: ULTENV /PRNAVAIL



/PRNBOLD PRINTS A BOLD FACED STRING ON THE PRINTER (LPT1)

Prints the string by overstriking it three times.

EX: ULTENV /PRNBOLD "Your momma"
ULTENV /PRNBOLD "I got the manager's job!"




/PRNCHR SEND CONTROL CODE TO PRINTER (LPT1)

This sends a single control code to the printer (LPT1).
The usual codes for a dot-matrix would be:

Code Usage
-------------------------------------------------
7 Ring printer's bell
9 Horizontal tab (forward)
10 Line feed
11 Vertical tab
12 Form feed
13 Carriage return
14 Double width text on
15 Compressed text on
18 Compressed text off
20 Double width text off
24 Clear printer buffer

Consult your printer's manual for its individual codes.

EX: ULTENV /PRNCHR 12 (send a form feed)
ULTENV /PRNCHR 24 (clear printer buffer)



/PRNUND PRINTS AN UNDERLINED STRING ON THE PRINTER (LPT1)

Prints the string by overstriking it three times.

EX: ULTENV /PRNUND "Your momma"
ULTENV /PRNUND "I got the manager's job!"



/QRTDECK IS a QuarterDeck product INSTALLED?

Determines if a Quarterdeck product is currently being used
(IE: QRAM.SYS, QEMM386.SYS, etc...)

RETURNS: 1 a Quarterdeck product is installed
0 none found

EX: ULTENV /QRTDECK



/S10 - 29 Different Sounds

Using /S10 - /S29 plays a variety of different sounds. It's
best to experiment in order to hear them.

EX: ULTENV /S10
ULTENV /S11
ULTENV /S12
ULTENV /S13
ULTENV /S14
ULTENV /S15
ULTENV /S16
ULTENV /S17
ULTENV /S18
ULTENV /S19
ULTENV /S20
ULTENV /S21
ULTENV /S22
ULTENV /S23
ULTENV /S24
ULTENV /S25
ULTENV /S26
ULTENV /S27
ULTENV /S28
ULTENV /S29




/SATTR GET SCREEN ATTRIBUTE

This returns the current screen color attribute. For more
information on colors and attributes, see "HOW TO MAKE BOXES"
section in the back of the ULT.DOC text file.

RETURNS: color value

EX: ULTENV /SATTR



/SECCLU SECTORS PER CLUSTER OF THE CURRENT DRIVE

Returns the sectors per clusters for the current disk drive.
For more information about clusters/bytes/sectors, consult a
technical manual.

RETURNS: sector per clusters

EX: ULTENV /SECCLU



/SHEIGHT GET THE SCREEN HEIGHT

This returns the current screen height (the maximum Y value).

RETURNS: maximum screen Y value (usually 24/28/33/43 or 50)

EX: ULTENV /SHEIGHT



/SMALLFILE GET THE SMALLEST FILE

Find the smallest file in a directory, and places it
in the ULT environmental variable.

RETURNS: number of files found

EX: ULTENV /SMALLFILE



/SMRTDRV IS Dos' SmartDrive INSTALLED?

Determines if Smartdrive is currently being used

RETURNS: 1 SMRTDRV.SYS is installed
0 none found

EX: ULTENV /SMRTDRV



/STUFF PUT KEYSTOKES INTO KEYBOARD BUFFER

This stuffs the keyboard buffer with up to 100 characters.

USAGE: ULTENV /STUFF string

EX: ULTENV /STUFF "dir /w"
ULTENV /STUFF "del *.bak"



/SUBT SUBTRACT TWO NUMBERS

This simply subtracts two numbers on the command line.
The result is placed in ULT environmental variable,
and placed in the DOS errorlevel (if the result is
less than 255). If the result has a decimal point: 3.254,
the result is the number before the decimal.

IE: 3.245341 will return only 3
64.52081 will return only 64

RETURNS: result

EX: ULTENV /SUBT 3 8
ULTENV /SUBT 14 93



/SUBDIR SHOWS A DIRECTORY PLUS SUBDIRECTORIES

This totals the size of a directory + subs, and displays
them in an organized and cute manner.

EX: ULTENV /SUBDIR \wp51
ULTENV /SUBDIR c:\



/SWIDTH GET THE SCREEN WIDTH

This returns the current screen width (the maximum X value).

RETURNS: maximum screen X value (usually 80)

EX: ULTENV /SWIDTH






/TOTCONV TOTAL CONVENTIONAL MEMORY INTO ENVIRONMENT

This places the total conventional memory into the
ULT environmental variable.

EX: ULTENV /TOTCONV
echo You have a total of %ULT% memory on your system.




/TOUCH SETS A FILE's DATE AND TIME TO THE CURRENT DATE/TIME

This resets a file date/time to the current date/time.
It's really a time saver!

EX: ULTENV /TOUCH list.com (resets list.com)
for %j in (*.doc) ULTENV /TOUCH %j (resets all .DOC files)




/WAITFOR WAIT FOR CHARACTER

This simply waits for a character to be pressed by the
user. All other keystrokes are ignored.

For a listing of characters and their values, see
/GETKEY in the included ULT.DOC file.

EX: ULTENV /WAITFOR



/WRITE (see above documentation)



/ZERO DELETE ALL ZERO BYTE FILES

This searches the current directory, and deletes all
zero byte files.

** REGISTERED USERS: Be Careful! **

EX: ULTENV /ZERO
















THE DOS ENVIRONMENT

This is a general discussion of the DOS Environment for those who may
not be sufficiently familiar with it. This section of ULT concentrates
a lot on the ULT variable, therefore this discussion is necessary.

The DOS Environment is a small area (usually) of memory that DOS automat-
ically allocates to every program that it is asked to load or run. The
"master" Environment is the original Environment allocated to COMMAND.COM
or 4DOS or whichever command processor you are using. The original size
of the Environment can be set in later versions of DOS by using the SHELL
command in your CONFIG.SYS file. However, the setting of Environment size
is not a SHELL command function, but is a command processor option. For
example, the COMMAND.COM /E: switch lets you set the size if you are using
COMMAND.COM as your command processor. For documentation look under such
topics as SHELL, COMMAND, and "Configuring Your System" in your DOS
manual. Since most new programs make extensive use of the Environment, it
is important to be sure enough Environment space is allocated to accom-
modate them all. If you see the error message "Out of Environment Space",
you know that you do not have enough allocated.

You can view the contents of the Environment by issuing the SET command
of DOS with no arguments at the DOS prompt. You will see a sequence of
variable names, each followed by the "=" sign and the string value as-
signed to the variable. For example, COMSPEC=C:\COMMAND.COM. You can
also store string information in the Environment with the SET command by
specifying it in the same manner as it is displayed. For example, SET
PATH=C:\;C:\DOS. Do not place any spaces on either side of the "=" sign
unless you intend for the space to be either a part of the variable name
or a part of the string. When DOS loads and runs a COM or EXE program
file, that program receives a copy of the Environment as it is at that
time, trimmed down so that only a few bytes remain free. This copy does
not change unless the program that owns it changes it.

Note that some DOS "shells" shield the master Environment from programs
that are executed by the shell. If you find that to be the case, the in-
formation will usually be available to the BATch file from the Environment
of the secondary command processor loaded by the shell as is usually
necessary to run a BATch file.

Also, when running from a shell there may be problems with
"Out of Environment space" since DOS does not usually allocate excess En-
vironment space to child processes. 4DOS provides a means to ensure that
copies of the Environment have sufficient space available. Check the doc-
umentation for your shell program to see if it can make sufficient En-
vironment space available.








========= OTHER MISCELLANEOUS NOTES =======================================

ULTENV will exit with an errorlevel of 0 unless an error
occurred. If there's a problem, ULTENV aborts with a
99 errorlevel.
















ÑÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑ
³ This is the ShareWare version of ULTRA ToolBox ³
³ ³
³ To register yours send $10.00 to: ³
³ ³
³ David Smith ³
³ 1104 Mason Dr ³
³ Hurst TX 76053 ³
³ ³
³ or $20.00 gets you all of my utils and ³
³ lifetime registration plus free upgrades ³
ÏÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÏ

Register the toolbox once, and you never have to register
again. All future upgrades are free!

My goal is to have 250 total options for the toolbox. You
will never have to look for batch utilities again!

See the enclosed ULT.EXE for more utilities ...


Please send a cheque or money For VISA/MasterCard order, call
order of US$10 to 1-800-2424-775 or 1-713-524-6394

David Smith Public (Software) Library
1104 Mason Drive P.O.Box 35705
Hurst TX 76053 Houston, TX 77235-5705
USA


















ÛÛÛÛÛÛÛ» ÛÛ» ÛÛ» ÛÛÛÛÛÛ» ÛÛÛÛÛÛ» ÛÛÛÛÛÛ» ÛÛÛÛÛÛ» ÛÛÛÛÛÛÛÛ» ÛÛÛÛÛÛ»
ÛÛÉÍÍÍͼ ÛÛº ÛÛº ÛÛÉÍÍÛÛ» ÛÛÉÍÍÛÛ» ÛÛÉÍÍÍÛÛ» ÛÛÉÍÍÛÛ» ÈÍÍÛÛÉÍͼ ÈÍÍÍÍÛÛ»
ÖÄÄÛÛÛÛÛÛÛ» ÛÛº ÛÛº ÛÛÛÛÛÛɼ ÛÛÛÛÛÛɼ ÛÛº ÛÛº ÛÛÛÛÛÛɼ ÛÛº ÜÛÛÛÉÐÄ·
º ÈÍÍÍÍÛÛº ÛÛº ÛÛº ÛÛÉÍÍͼ ÛÛÉÍÍͼ ÛÛº ÛÛº ÛÛÉÍÍÛÛ» ÛÛº ßßÍͼ º
º ÛÛÛÛÛÛÛº ÈÛÛÛÛÛÛɼ ÛÛº ÛÛº ÈÛÛÛÛÛÛɼ ÛÛº ÛÛº ÛÛº ÛÛ» º
º ÈÍÍÍÍÍͼ ÈÍÍÍÍͼ Èͼ Èͼ ÈÍÍÍÍͼ Èͼ Èͼ Èͼ Èͼ º
º º
º º
º Support for this program is available in the following ways: º
º º
º º
º ÖÄÄ¿ ÖÄÄ¿ ÖÄÒÄ¿ ÒÄÄ¿ Ò Â ÖÄ¿ ÒÄÄ¿ ÒÄÄ¿ Ò Â ÒÄÄ¿ º
º º º ³ º º ³ ÇÄÄÙ º ³ ÓÄ¿ ÇÄ ÇÄÂÙ Ó·ÚÙ ÇÄ º
º ÓÄÄÙ ÓÄÄÙ Ð Ð Á Ð ÓÄÄÙ ÓÄÄÙ ÐÄÄÙ Ð Á ÓÙ ÐÄÄÙ º
º User ID: 71441,2723 º
º I usually log on every other day and check my mail. º
º º
º º
º ÜÜÜÜÜÜ ÜÜÜÜÜÜ ÜÜÜÜÜÜÜ º
º Û ÜÜ ÛÜ Û ÜÜ ÛÜ Û ÜÜÜÜÛ º
º Û ÜÜÜ Û Û ÜÜÜ Û ÛÜÜÜÜ Û º
º ÛÜÜÜÜÜÛ ÛÜÜÜÜÜÛ ÛÜÜÜÜÜÛ º
º Drop me a line on the Hogard Systems Bulletin Board º
º David Smith (214) 641-6292 º
º º
º º
º ÜÛÛÜ ÜÛÛÜ ÜÛÛÛÛÛÛÛÜ ÜÛÜ ÜÛÛÜ º
º ÛÛÛÛÛÜÛÛÛÛÛ ÛÛÛÛßßßÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ º
º ÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÜÜÜÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ º
º ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛ º
º ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛ ÛÛÛÛÜÜÜÜÜÜÜ º
º ßÛÛß ßÛÛß ßÛÛß ßÛÛß ßÛß ßÛÛÛÛÛÛÛÛß º
º Write to: º
º º
º David Smith º
º 1104 Mason Dr. º
º Hurst TX 76053 º
º º
ÓÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĽ







  3 Responses to “Category : Batch File Utilities - mostly for DOS
Archive   : ULTRA60.ZIP
Filename : ULTENV.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/