<Continuation - See README.TXT for the license agreement and generic info>

MAKEDIR.COM and REMOVDIR.COM
----------------------------
These are non-complaining substitutes for the DOS "mkdir" or "md" command,
and "rmdir" or "rd" command, respectively, suitable for use in batch files.

Syntax: MAKEDIR dirspec
    or: REMOVDIR dirspec

MAKEDIR attempts to create the specified directory. If the directory already
exists, its report of "Cannot create directory dirspec" is directed to STDOUT
where it can be readily suppressed with ">nul". Returns errorlevel 1 if the
directory cannot be created.

Similarly, REMOVDIR attempts to remove the specified directory, and its
report of being unable to do so is redirectable. It returns errorlevel 1
if the directory cannot be removed.

Typically, one would have to do the following when writing a batch to install
files into a subdirectory:

   if not exist dirspec\nul md dirspec
   copy path\*.* dirspec >nul

Unfortunately, in some situations (e.g., network drives, or a DOS box in OS/2) 
DOS is fooled into thinking the directory already exists even when it doesn't.
The result is one large file named DIRSPEC instead of a directory with files.
With MAKEDIR, this is not a problem. The batch becomes:

   makedir dirspec >nul
   copy path\*.* dirspec >nul

This will create the directory properly in any operating environment.

The companion REMOVDIR command is provided for convenience, to avoid
constructs of the form "if not exist dirspec\*.* rd dirspec". This is
especially helpful when other conditions being tested in the batch are
already pushing the command line length to its 127 character limit.



DELFILE.COM
-----------
Just as REMOVDIR gets rid of directories in a batch-friendly way,
DELFILE gets rid of unwanted files.

Syntax: DELFILE filespec

Its report, announcing whether or not the file was deleted, is redirectable.
It returns errorlevel 1 if the file cannot be deleted.



BIN2ASC.EXE and ASC2BIN.EXE
---------------------------
This is a complementary pair of programs for converting binary files to
ASCII files and back again.

Syntax: BIN2ASC binfile.ext ascfile.ext
        ASC2BIN ascfile.ext binfile.ext

Some communication protocols, designed for use with ASCII files, cannot
transfer binary files due to their interpretation of special characters
within the data stream. BIN2ASC converts a binary file of size x to an
ASCII file of size 2x that contains the hexadecimal ASCII representation
of the binary values found in the original file. ASC2BIN converts such a
file back to its original binary form.



INTADD.COM
----------
Integer Addition program suitable for use with decimal or hexadecimal values.

Syntax: INTADD [x][-]value1 [x][-]value2

The output is a "SET RESULT=sum" command printed to stdout, which can be
redirected into a batch file and called to create the RESULT environment
variable. The sum is formatted as either a four-digit hexadecimal value
with leading zeros, or as a non-padded decimal value. The format of value1
determines the format of the sum. The formats of value1 and value2 need not
match. A leading "x" identifies the value as hexadecimal, but the output sum
will not include an x. The input parameters are not case-sensitive.
Permissible values are hexadecimal 0000 to FFFF or decimal -32768 to 32767.
Hexadecimal results of 8000 through FFFF are considered to be "negative".
The returned errorlevel code is 0 for positive result, 1 for negative, and
2 for syntax error.

Examples:

   INTADD xc800 x0400    produces   SET RESULT=CC00     with errorlevel 1

   INTADD xc800 -1       produces   SET RESULT=C7FF     with errorlevel 1

   INTADD xc800 x-c000   produces   SET RESULT=0800     with errorlevel 0

   INTADD x1000 4096     produces   SET RESULT=2000     with errorlevel 0

   INTADD 4096 x1000     produces   SET RESULT=8192     with errorlevel 0

   INTADD x7000 8192     produces   SET RESULT=9000     with errorlevel 1

   INTADD 8192 x7000     produces   SET RESULT=-28672   with errorlevel 1


Batch Example: Note that the "set v1" used here might be replaced with a
               batch-generated setting produced by reading a configuration
               file in a real situation.

   @echo off
   set v1=c800
   intadd x%v1% x03FF >temp.bat
   call temp.bat
   del temp.bat

   :: You now have a RESULT environment variable that contains CC00.
   :: Continuing:

   set test1=N
   set test2=N
   intadd x%result% x1000 >nul
   if errorlevel 1 set test1=Y
   intadd x%v1% x-c800 >nul
   if not errorlevel 1 set test2=Y
   if not %test1%%test2%==YY goto end
   echo.
   echo Values are within the upper memory range; setting EMM exclusions:
   xchange /i c:\config.sys "emm386.exe" "emm386.exe x=%v1%-%result%" >nul
   inimod c:\windows\system.ini "386Enh" "EMMExclude" "%v1%-%result%" /a >nul

   :end
   echo.



LONGADD.COM
-----------
Integer Addition program suitable for use with decimal or hexadecimal values.
Operation is identical to INTADD.COM, but the range of input and output is
hexadecimal 00000000 to FFFFFFFF (decimal -2147483648 to 2147483647), where
hexadecimal values 80000000 to FFFFFFFF are considered negative.

Syntax: LONGADD [x][-]value1 [x][-]value2

The output is a "SET RESULT=sum" command printed to stdout, which can be
redirected into a batch file and called to create the RESULT environment
variable. The sum is formatted as either an eight-digit hexadecimal value
with leading zeros, or as a non-padded decimal value. The format of value1
determines the format of the sum. The formats of value1 and value2 need not
match. A leading "x" identifies the value as hexadecimal, but the output sum
will not include an x. The input parameters are not case-sensitive.
The returned errorlevel code is 0 for positive result, 1 for negative, and
2 for syntax error.

Examples:

   LONGADD xc800 x400     produces   SET RESULT=0000CC00   with errorlevel 0

   LONGADD xc800 -1       produces   SET RESULT=0000C7FF   with errorlevel 0

   LONGADD xc800 x-c000   produces   SET RESULT=00000800   with errorlevel 0

   LONGADD x1000 4096     produces   SET RESULT=00002000   with errorlevel 0

   LONGADD 4096 x1000     produces   SET RESULT=8192       with errorlevel 0

   LONGADD x1000 -8192    produces   SET RESULT=FFFFF000   with errorlevel 1

   LONGADD -8192 x1000    produces   SET RESULT=-4096      with errorlevel 1


Batch Example: Testing the PC for at least 64 MB of RAM (63 MB extended),
               using EXTMEM, XCHANGE, and LONGADD utilities from this pack:

   @echo off
   extmem >c:\temp.bat
   xchange c:\temp.bat "Extended Memory =" "longadd" >nul
   xchange c:\temp.bat "K" " -64512 >nul" >nul
   call c:\temp.bat
   del c:\temp.bat
   if not errorlevel 1 goto ok
   echo.
   echo This PC has less than 64 MB RAM (less than 64512K extended memory):
   extmem
   goto end

   :ok
   echo This PC has enough memory. Continuing...
   .
   .
   .

   :end
   echo.



INTOR.COM
---------
Integer Bitwise OR program for use with decimal or hexadecimal values.

Syntax: INTOR [x][-]value1 [x][-]value2

The output is a "SET RESULT=value" command printed to stdout, which can be
redirected into a batch file and called to create the RESULT environment
variable. The result is formatted as either a four-digit hexadecimal value
with leading zeros, or as a non-padded decimal value. The format of value1
determines the result's format. The formats of value1 and value2 need not
match. A leading "x" identifies the value as hexadecimal, but the output
will not include an x. The input parameters are not case-sensitive.
Permissible values are hexadecimal 0000 to FFFF or decimal -32768 to 32767.
Hexadecimal results of 8000 through FFFF are considered to be "negative".
The returned errorlevel code is 0 for positive result, 1 for negative, and
2 for syntax error.

Examples:

INTOR 59 3  produces SET RESULT=59   INTOR X3B 3  produces SET RESULT=003B
INTOR 60 3  produces SET RESULT=63   INTOR X3C 3  produces SET RESULT=003F
INTOR 61 3  produces SET RESULT=63   INTOR X3D 3  produces SET RESULT=003F
INTOR 62 3  produces SET RESULT=63   INTOR X3E 3  produces SET RESULT=003F
INTOR 63 3  produces SET RESULT=63   INTOR X3F 3  produces SET RESULT=003F
INTOR 64 3  produces SET RESULT=67   INTOR X40 3  produces SET RESULT=0043



INTAND.COM
----------
Integer Bitwise AND program for use with decimal or hexadecimal values.

Syntax: INTAND [x][-]value1 [x][-]value2

The output is a "SET RESULT=value" command printed to stdout, which can be
redirected into a batch file and called to create the RESULT environment
variable. The result is formatted as either a four-digit hexadecimal value
with leading zeros, or as a non-padded decimal value. The format of value1
determines the result's format. The formats of value1 and value2 need not
match. A leading "x" identifies the value as hexadecimal, but the output
will not include an x. The input parameters are not case-sensitive.
Permissible values are hexadecimal 0000 to FFFF or decimal -32768 to 32767.
Hexadecimal results of 8000 through FFFF are considered to be "negative".
The returned errorlevel code is 0 for positive result, 1 for negative, and
2 for syntax error.

Examples:

INTAND 59 3  produces SET RESULT=3   INTAND X3B 3  produces SET RESULT=0003
INTAND 60 3  produces SET RESULT=0   INTAND X3C 3  produces SET RESULT=0000
INTAND 61 3  produces SET RESULT=1   INTAND X3D 3  produces SET RESULT=0001
INTAND 62 3  produces SET RESULT=2   INTAND X3E 3  produces SET RESULT=0002
INTAND 63 3  produces SET RESULT=3   INTAND X3F 3  produces SET RESULT=0003
INTAND 64 3  produces SET RESULT=0   INTAND X40 3  produces SET RESULT=0000



INPUT.COM
---------
Provides text input within a batch file, one line of up to 128 characters.

Syntax: INPUT "prompt" filespec

The prompt is displayed, and characters are fetched from STDIN until a
carriage return is received. The received characters are then appended to
the specified file, minus the carriage return. If a terminating carriage
return is required, the INPUT statement must be followed by the command,

   echo.>>filespec

INPUT has many possibilities. Because it doesn't pass the carriage return,
you can concatenate many responses or other text to the initial response.
Because it doesn't overwrite an existing file, concatenation is the default.
If you need a new file, be sure to delete any existing file by that name
before invoking INPUT.

Its input can be redirected from another file. This is a handy way of
creating strings of text that aren't return-terminated. For example, when
your batch says "echo string>file1", you actually get "string" + CRLF in the
file. To get just "string" without the CRLF, do this after the echo:

   input "" file2 <file1

INPUT is also very nice for getting input for other commands that don't
behave as you would like. For example, suppose another command displays a
nice prompt and requests input, but then messes up the screen with a report
of what it's doing with the input. If you redirect its output to nul or to
a file, you lose the nice prompt and the user can't see what he's typing.
Here's the solution:

   if exist file1 del file1
   input "nice prompt" file1
   echo.>>file1
   messycommand <file1 >nul

This lets the user see the nice prompt (which you can now tailor to your
liking), and it lets the messy command receive the intended input without
messing up the screen.

Another great use of INPUT is to set environment variables with input typed
by the user. Here's how:

   echo set envar=>temp.fil
   if exist temp.bat del temp.bat
   input "" temp.bat <temp.fil
   input "Please enter the desired setting:" temp.bat
   echo.>>temp.bat
   call temp.bat
   del temp.bat
   del temp.fil

You now have an environment variable named ENVAR that contains the string
typed by the user.



TPAUSE.COM
----------
Timed Pause displays a user-specified prompt and accepts a single-keystroke
response. If no key is pressed within the timeout interval, it terminates
with zero errorlevel.

Syntax: TPAUSE [/T:hh:mm:ss] "prompt"[,keylist]

Timeout may be from 1 second to 23 hours 59 minutes 59 seconds, or infinite.
Default timeout = 1 minute.  Keylist is case-insensitive.
If keylist is omitted, any keystroke will terminate the delay.
Returns errorlevel code = position of keystroke within list, 0 = timed out.
See (and execute) TPHELP.BAT for usage examples.

The colons are optional; when omitted there must be two digits per portion
with the exception of seconds. Short strings are assumed to represent short
intervals. For example, /t5 = 5 seconds, /t5:00 or /t0500 = 5 minutes,
/t050000 = 5 hours, /t5000 or /t500 = 50 minutes. Times of less than 100
seconds may be represented as seconds; e.g., /t90 = 90 seconds. To disable
timeout (infinite wait) use zero, /t0.



TZSET.EXE
---------
Automatic TZ Adjustment for Daylight Savings Time.

TZSET automatically sets the TZ environment variable to either CST6 or
CST6CDT, depending on whether or not the current system date is between the
first Sunday in April and the fourth Sunday in October. The central time zone
is only a default; if you use it in another time zone, simply preset TZ to
the base setting for your time zone (e.g., SET TZ=EST5) before invoking
TZSET. It will then produce either the same setting or one with the proper
"_DT" appended to it (e.g., SET TZ=EST5EDT). If the current TZ setting is
undefined, or if its 2nd through 4th characters are not "ST" followed by a
numeric character, the default CST zone is used. A confirmational message of
the form ":: Setting TZ=CST6CDT" is issued to STDOUT. The double colon is
for compatibility with the old TZSET.COM, which always generated SET TZ=
commands that had to be captured in a temporary batch; this prevents syntax
errors when its new output is inadvertently executed.

The environment that gets modified is that of the active COMMAND.COM command
processor (i.e., if you are shelled out to DOS from an application, or in a
DOS box in Windows, the subordinate COMMAND.COM environment in which you are
working gets modified rather than that of the master command environment
created at boot time; this is the same way the SET command works). This can
fail only if the command processor has a name other than COMMAND.COM or has
inadequate environment space to hold the new setting.

In the case of a differently-named command processor, TZSET will generate an
errorlevel of 1, and it will output a SET command that can be captured in a
temporary batch file as follows:

   tzset >temp.bat
   if errorlevel 1 call temp
   del temp.bat

If the error condition was generated by inadequate space in the command
processor environment, this will generate an "Out of environment space"
message when the "call temp" executes. TZSET itself does not produce such
a message, but returns errorlevel 1 to flag its inability to change the
environment.



FINDALL.EXE
-----------
An alternative to the DOS FIND command.  The syntax is different:

FINDALL [/i] filespec "[srchstrng][^[x]chr,][...]"
FINDALL [/i] filespec @scriptfile

Switch /i = ignore case (can be in any parameter position); chr = ASCII.
Search string can be any combination of literals and ^-prefixed, comma-
delimited ASCII codes (^1 through ^255 or ^x01 through ^xFF).
Use double ^ or , for literal ^ or , character within a string.
Quotes may be omitted if there are no spaces within strings.

NOTE: FIND's /V, /C, and /N switches are not supported.

This program provides "ignore case" (/I) capability to all versions of DOS
from 3.0 on up.  It will output lines of up to 8192 characters containing
the sought text.  By using wildcards in the filespec, multiple files may be
searched with a single command, and the output is not dirtied up with the
names of files being checked.



LMORE.COM
---------
An alternative to the DOS MORE command.  Use it in identical fashion.

Although the DOS MORE command has improved in recent versions, it is still
quite messy, especially when dealing with lines longer than 80 characters
(i.e., lines that wrap around to display as multiple-line records).  It has
a bad habit of printing its "-- More --" prompt in the middle of a line and
thoroughly messing up the display format of all remaining display lines of
the affected record.

LMORE is a line-based MORE that checks the length of each input record to
ensure that it will fit on the current screenful before displaying it.
If the entire record cannot fit on the screen, the "-- More --" prompt
appears in the position that the first line would occupy.  When a key is
pressed, it backspaces over its prompt, overwrites the prompt with spaces,
then backspaces over it again so that the display can continue in uninter-
rupted fashion.  If the keystroke is Esc or Ctrl-C, the process is aborted.



INIMOD.EXE
----------
This utility allows you to add, delete, or modify settings within specific
sections of Windows-style .INI files.

Syntax variations:

   1) INIMOD filespec "section" "variable" "value" [/a | /d]
   2) INIMOD filespec "section" "variable" /d
   3) INIMOD filespec "section" /d

Variation 1 looks for the specified variable name within the specified
section and changes its value to the one specified. If the section does
not exist, it gets appended to the end of the file, and if the variable
does not exist within the specified section, it gets appended to the end
of that section. Omitting the value will leave the variable in place with
nothing to the right of the equals sign. Options /a and /d are for variable
names that may exist in more than one instance within the section; e.g.,
the many "device=" lines in the [386Enh] section of SYSTEM.INI. Option /a
will add the requested setting, if not already present, without affecting
any existing settings that use the same keyword. Option /d will delete
only the line in which the setting is functionally equal to that specified.
Be very careful to always use the "/a" option when adding such a multiple-
instance setting, lest you lose all the other instances!

Variation 2 looks for the specified variable name within the specified
section and deletes that line. Be careful; if multiple instances of the
same keyword appear in that section, all will be deleted.

Variation 3 looks for the specified section header and deletes it along
with all variables following it until the next section header is reached.

If the value string is too long to fit on the command line, use a dummy
setting such as "!$!" and follow the INIMOD command with an XCHANGE command
using a script file to change the dummy setting to the desired setting.

All parameters are case-insensitive; however, a new or modified setting
will be written in the exact case used on the command line. All syntax
variations perform cleanup of redundant settings that are functionally
equal to the specified setting.

The present implementation handles just one setting at a time. If multiple
settings are to be made, use a batch to call INIMOD for each one. Output
to the screen identifies the changes made, or the fact that no change was
necessary. The INIMOD command, entered without parameters, will display a
syntax summary and a list of errorlevel codes.



INIREAD.EXE
----------- 
This .INI file interpreter for batch files allows you to capture any
desired setting, from any section, in the environment variable you name.

Syntax: INIREAD filename "section heading" "parameter" "envarname"

If the parameter is found in multiple lines of the same section (e.g.,
"device=" in the [386Enh] section of SYSTEM.INI), the first occurrence
will be returned in the specified variable, and the subsequent occurrences
will be returned in variables having similar names with numerical suffixes
2 through n, where n is the number of occurrences found.

Example: INIREAD c:\windows\system.ini "386enh" "device" "dev$dvr"
will return the first device= setting in environment variable DEV$DVR;
if there are 15 device= settings, the rest will be in DEV$DVR2 through
DEV$DVR15.

Multiple parameters can be handled in your batch via the INTADD.COM
and XCHANGE.EXE utilities in a loop structure. For example:

   @echo off
   INIREAD c:\windows\system.ini "386enh" "device" "dev$dvr" >nul
   if errorlevel 2 goto end
   echo Setting #1: %dev$dvr%
   set result=1
   :chknxt
   intadd %result% 1 >temp1.bat
   copy temp1.bat temp2.bat >nul
   xchange temp2.bat "SET RESULT=" "SET ENVAR=%%DEV$DVR" >nul
   xchange temp2.bat ^13 "%%^13" >nul
   call temp2.bat
   if %envar%.==. goto end
   call temp1.bat
   echo Setting #%result%: %envar%
   goto chknxt
   :end
   del temp?.bat
   set result=
   set envar=
   echo End of list.

Echos an indication of the outcome and returns an errorlevel code as follows:
0 = one setting found,  1 = multiple settings found,   2 = no setting found,
3 = section not found,  4 = out of environment space,  5 = file inaccessible,
6 = other error (syntax, path interpretation, or unable to locate environment)

Note: If the sought parameter is found in the specified section, but has
      nothing to the right of the "=" sign, the specified environment
      variable will be cleared and the errorlevel will be zero (or 1, if
      the empty setting was one of multiple settings), as the empty condition
      correctly reflects the content of the .INI file. However, when the
      errorlevel is 2 or greater, the environment table will retain any
      previously existing settings for variables corresponding to parameters
      that are not defined in the file or were not successfully processed
      prior to the error.



RUNBAT$.EXE
-----------
This is a batch file launcher for use within a user's Novell network
login script. It looks up the COMSPEC environment variable and calls
whatever is referenced therein (i.e., the fully qualified path to the
command line processor), passing it parameters requesting a 5K space
for environment variables (/E:5120) and command execution (/C) plus
whatever parameters (maximum quantity of 9) are included on the RUNBAT$
command line.

For example, if COMSPEC=C:\DOS\COMMAND.COM, then the following login
script entry:

   #RUNBAT$.EXE Y:\PUBLIC\BATCH\PROCESS.BAT PARM1 PARM2

is equivalent to this:

   #C:\DOS\COMMAND.COM /E:5120 /C Y:\PUBLIC\BATCH\PROCESS.BAT PARM1 PARM2

The use of RUNBAT$.EXE makes this work regardless of where COMMAND.COM
actually is, and eliminates the awkward COMMAND.COM parameter syntax
from the login script. RUNBAT$.EXE consumes virtually no memory, loading
COMMAND.COM into the memory space that RUNBAT$.EXE itself originally
occupied.

RUNBAT$.EXE is for use only with MS-DOS versions 3.0 through 6.22. It should
not be used with Windows 95 or later because COMMAND.COM is too large to
be compatible with the overlay process. See RUNBAT$.COM below.



RUNBAT$.COM
-----------
Used in the same manner described above for RUNBAT$.EXE, RUNBAT$.COM runs
COMMAND.COM as a child process instead of letting it overlay RUNBAT$.COM in
memory. This has an impact of approximately 15K on the conventional DOS
memory available to the launched batch process. However, this makes it
compatible with Windows 95 and later in addition to remaining compatible
with MS-DOS versions 3.0 through 6.22.



ENVMASTR.EXE
------------
When you use the SET command while shelled out from an application, it sees
only the local environment of the shell. ENVMASTR lets you work in the
master environment that was created when the system was booted, and/or
any subordinate environments. This is especially useful when using RUNBAT$
to execute a batch whose environment manipulation is expected to stick to
the command environment from which RUNBAT$ was executed. The batch can
either make all environment changes through ENVMASTR, or make them locally
and then use ENVMASTR to copy the modified environment into the master.
A display-only option lets you view the content of any environment space,
complete with a report of the environment size, bytes used and bytes free.
Beginning with Version 3.0, ENVMASTR can display and edit environment blocks
in upper memory as well as conventional memory, and any instance of COMMAND
found in upper memory is promoted to "master" status (this ensures that the
master environment is properly identified when Windows 95 or later
high-loads COMMAND.COM).

Syntax: ENVMASTR [/d] [/c] [/n:progname] [/s] [/x] [/l] [varname=setting]

If no option switches are given, it applies varname=setting to the master
command environment only (i.e., the command processor loaded by CONFIG.SYS).
The option switches, which may be indicated by either a slash or a dash,
modify its operation as follows:

/d displays the environment(s) without changing anything (ignores varname).
/c copies the entire current local environment to target(s) (ignores varname).
/n names a specific target program's environment to be modified (any level).
/s targets all subordinate environments that have room.
/x excludes the master environment (implies /s).
/l allows lower-case characters in the variable name (default is forced CAPS).

Note: If the desired value begins with a space, enclose it in quotation marks.
      For quotation marks within the setting, prefix each with a backslash.

The order of the option switches is not important, so long as all precede
the varname=setting (if any). The varname=setting is required except
when option /c or /d is used, in which case varname=setting is ignored.
The /c option should be used with caution, as you may be copying some
settings that you really don't want to have in the target environment,
especially when you use ENVMASTR from a DOS box under Windows. Windows
maintains some settings that should not be carried back to the master
environment from which Windows was launched. When this happens, the /l
option will allow you to get rid of the "windir" variable, which is in
lower case and cannot be removed by a SET command. When using /n to name
a specific target environment, the progname is typically the executable
file name without any extension.

For example, to change all COMMAND.COM environments regardless of how
many shell levels are present, without affecting any other programs,
use the following command, substituting your variable name and setting:

   ENVMASTR /N:COMMAND varname=value

If you were copying the local command environment to all COMMAND.COM
shell levels, the command would be:

   ENVMASTR /N:COMMAND /C

To copy the local environment to the master only, use ENVMASTR /C without
any /n specification.

To remove a variable name from the environment, use varname= (without a
setting), just as you do when using SET.

To view the usage of only the subordinate COMMAND.COM environment, without
seeing the master environment, use this command:

   ENVMASTR /N:COMMAND /X /D

Note that this will show nothing if the current command environment IS the
master environment. To see only the master environment, just do this:

   ENVMASTR /D

A list of target environments found, and the success or failure of the
requested setting in each, is sent to STDOUT for display or redirection.

It returns errorlevel 1 if a subordinate environment could not be changed,
and errorlevel 2 if the master environment could not be changed.
Errorlevel 3 indicates a syntax error (no setting attempted).

Errorlevel 1 or 2 occurs only in the event that the target environment
is too small to accommodate the requested change. There is no errorlevel
when a specified program environment is not present, nor when using /d.

ENVMASTR is very careful to ensure that the change can be accommodated
within the target environment. It also preserves command line argument
zero (i.e., the command line without parameters), which follows the
defined variables; this information is never copied from one environment
to another but is preserved in its original state. Argument zero will move
within its home environment, so that it always follows the variable list
in the correct relative position, and the change will be disallowed if
there is no room to append argument zero to the list.



NRTS.EXE
--------
This is a utility for testing a user's rights in a specified Novell
server volume subdirectory. It works with Novell Netware 3.11.

Syntax: NRTS d:path  (where "path" is a network directory mapped to drive d:)

If path begins with a backslash, it must be fully qualified RELATIVE TO THE
NETWORK SERVER VOLUME, which may differ from the path of the mapped DOS logical
drive if the drive is MAP ROOTed into a subdirectory of the server volume.

Returns errorlevel 0 for full Read/Write privileges, 1 for Read-Only, 2 for
neither Read nor Write, 3 for invalid path specification.  Text description
of rights is returned to STDOUT and may be redirected to NUL or to a file.

Caution: Netware will not properly reject the path as invalid when only the
last specified subdirectory level is non-existent.  Instead, it will report
that you have write privileges in the non-existent directory.  Be sure to spell
the subdirectory name correctly.  Do not rely upon this program to confirm that
a desired directory was properly mapped.  It is for rights testing ONLY!



SYSSAVE.EXE
-----------
This utility saves an image of the C: drive's critical system areas, including
the DOS Boot Record (DBR), both FATs and the root directory. Several images
are kept in rotation, increasing the probability that a good image will still
be available when a problem in these areas is eventually discovered.

NOTE: THIS UTILITY ASSUMES A FAT16 DISK STRUCTURE.  DON'T USE IT ON FAT32.

Syntax: SYSSAVE [maxfiles] | [/RESTORE [filespec]]

The maximum number of files to maintain may be specified by a single character
1 through 9, or capital A through Z representing 10 through 35; default = 7.
Option /RESTORE must be fully spelled out in CAPS to impose restoration of the
most recently saved image. If this proves corrupt, rename it with a multiple-
character extension to prevent its use, or specify the desired file.
Unqualified files are assumed to be in the default directory, C:\SYSSAVE.

Returns errorlevel code 0 = backed up, 1 = restored, 2 = error.

Companion batch script SYSBACK.BAT uses SYSSAVE in combination with FILEAGE to
perform periodic system area backups, with additional levels of redundancy
occurring after specified quantities of days. See the batch script for
comments describing its operation.

Disk repair utilities (SCANDISK, NDD, etc.) assume that the FATs must be
valid if they agree with each other, but when they are identically corrupted
this results in inappropriate adjustments to file sizes in the directories.
Your SYSSAVE backups can help you restore the FATs and the root directory to
some reasonable approximation of reality, thus minimizing the risk of doing
more harm than good when subsequently running the repair tool.

This utility was developed as a safety net when some Pentium and Pentium II
systems on a network began experiencing Drive C: system area corruption from
MS-DOS prompts crashing under Windows 3.1. To recover from such corruption,
use a diskette-based copy of SYSSAVE and a utility such as Norton's DiskEdit.
If the PC's SYSSAVE directory is still accessible, simply go there and run
A:\SYSSAVE /RESTORE (all-CAPS), as described above. If the SYSSAVE directory
is missing, use a disk editor to search for the string "SYSSAVE$" and view
the found sector as a directory. Open the latest backup file and identify the
SECTOR numbers (not clusters) on which it begins and ends. Open an object
consisting of only the logical sectors occupied by the file and write that
object to logical sectors beginning with sector 0.

An even safer approach is to browse the boot record, FATs and root directory
in search of corruption, then select only those sectors of the image that
correspond to the damaged areas and write them back to the damaged sectors
only.

In any case, the final step should be to run SCANDISK or other disk repair
utility to resolve any remaining discrepancies. If you've done a good
job restoring your SYSSAVE data, there will be nothing left to fix but some
lost clusters that were probably already lost before the crash occurred. If
there are still a lot of crosslinked and truncated files, you've probably
restored a backup that was made after the damage was done; go back and look
for one that's in better shape. Of course, if extensive file changes were
made during the interval between the last SYSSAVE backup and the crash, a
perfect recovery probably won't be possible.



REDATE.EXE
----------
Redates files intuitively (no stupid /D: or /T: switches).

REDATE fspec [MM/DD/YYYY] [HH:MM:SS]

If fspec matches no files but does match a unique directory name (no wildcard),
all files in the specified directory will be redated identically.

Date field separators may be slashes or dashes. Unspecified year defaults to
the current year; unspecified century defaults to 1900 if year > 79, or
2000 if year < 80. Unspecified seconds default to zero. Omitting either the
date or time spec leaves it as-is; omitting both uses current date and time.
Time can be specified before date if desired. A space must separate the time
from the date, regardless of the order in which they are specified.

Returns errorlevel: 0 = redated,  3 = syntax error,  4 = file not writeable.
When wildcards are used, highest level for the file group is returned.



RENDATE.EXE
-----------
This utility renames files to reflect dates (i.e., YYYYMMDD.ext).

Syntax: RENDATE fspec [MM/DD/YYYY | /C] [new_extn]

Date defaults to the file's date stamp; switch /C uses clock date instead.
A new extension may be specified; default is the same as the original file.
If the new name already exists, extension becomes first available of 000-999.
If fspec matches no files but does match a unique directory name (no wildcard),
all files in the specified directory will be renamed to reflect dates.

Date field separators may be slashes or dashes. Unspecified year defaults to
the current year; unspecified century defaults to 1900 if year > 79, or
2000 if year < 80.

Return codes: 0 = redated,  3 = syntax error,  4 = read-only,  5 = name exists
When wildcards are used, highest level for the file group is returned.



FTIMECMP.EXE
------------
This utility compares the date/time stamps of two files.

Syntax: FTIMECMP reffile target [/s | /n | /h | /d | /w | /m | /y]

The errorlevel code equals the number of time units by which the reference
file is newer than the target.  Optional parameter can specify units of
seconds, minutes, hours, days, weeks, months, or years (default = days).
Returns 255 if reference file is older than the target.  You can specify the
expected newer file first, then check for errorlevel 255 to see if your
expectation was incorrect.

The largest valid unit quantity returned by errorlevel is 250, but much
larger values (up to 2 gig) may be displayed (will return errorlevel 251).

Errorlevel Summary:
250 or less = actual age difference      251 = Age difference > 250 units
252 = File is busy, permission denied    253 = Syntax error
254 = File not found or inaccessible     255 = Reference older than target

Note that the text output will say the reference is the "same age as" the
target only if the difference is exactly zero.  If the reference is slightly
newer (or older) than the target, but not by at least one whole unit, the
display will say the reference is "0 <units> newer (or older) than" the
target, and the errorlevel will be zero if newer, 255 if older.



All of the above utilities were generated with an assembler or a C compiler.
See README2.TXT for additional included utilities, which were hand-assembled.
