c:\test\> _





4DOS Versions
4NT Versions
4OS2 Versions
4DOS Tips & Tricks
4DOS Docs
4DOS Batches, Aliases, Functions
  B. Schneider's
  K. Meinhard's
4DOS Links
4DOS Tools



DOS Alternatives

DOS Hardware

DOS Tools

DOS Programs

DOS Gems


Search Engines

Contact me

Back to Homepage

4DOS V4.nn  Version History

This page can be downloaded in MS-Word .doc format.

4DOS Change Log - this log describes changes and bug fixes to version 4.nn of 4DOS

Version 4.0 -- November 1, 1991

Installation and Configuration

  • 4DOS is now a single file, 4DOS.COM. The old structure of separate 4DOS.COM and 4DOS88.EXE / 4DOS286.EXE files has been eliminated. There is a wide variety of new startup options for 4DOS, ranging from the simple to the highly technical. Most of the startup switches that used to go on the SHELL= line in CONFIG.SYS or in the 4DSHELL environment variable have been eliminated, and 4DOS configuration is now controlled through the new 4DOS.INI file, for both primary and secondary shells. Those switches which still work for DOS compatibility reasons (such as /E: for environment size) can also be set through 4DOS.INI. If you install 4DOS manually or have a complex configuration, you should read about 4DOS.INI in the manual before modifying your SHELL= line to load version 4.0! See Chapter 6 for more details.  The following summary lists version 3 startup switches and the corresponding 4DOS.INI directive for version 4.0. Switches marked with a "*" are still available in version 4.0, in order to maintain compatibility with DOS.

Ver. 3 Switch  Function               4DOS.INI Directive

-------------  ---------------------  -------------------

/A:nnnn        Set alias list size    Alias = nnnn

/C*            Execute one command    none

/E:nnnn*       Set environment size   Environment = nnnn

/E:nnnnU       Load environment high  UMBEnvironment = Yes

/H:nnnn        Set history list size  History = nnnn

/L:path        Set EXE file location  none, not needed

/P*            Load permanently       none

/R             Disable reduced swap   Reduce = No

/S:type        Set swap type          Swapping = swap type

/U             Load 4DOS high         UMBLoad = Yes

/V             (Used with Windows)    none, automatic

  • The KEYSTACK.SYS device driver is no longer used. It has beenreplaced by KSTACK.COM, a TSR (memory-resident program), normallyloaded from AUTOEXEC.BAT (or with INSTALL= in CONFIG.SYS).

  • The /P switch is now set automatically when 4DOS is loaded as the true primary shell via a SHELL= statement in CONFIG.SYS.

  • 4DOS now supports the COMMAND.COM syntax for specifying a COMSPEC-directory in the SHELL statement. See "Setting up CONFIG.SYS". However (see next item) ...

  • Under MS-DOS and PC-DOS you probably won't need to set the COMSPEC directory on the SHELL= line or in AUTOEXEC. 4DOS sets it automatically in most cases, provided that you specify the full path for 4DOS.COM in the name you use on the SHELL= line in CONFIG.SYS. If you use DR-DOS automatic determination of the COMSPEC directory will NOT work, so you will have to set the directory yourself on the SHELL= line. (Thanks to Hans Salvisberg, author of BOOT.SYS, for the technical information needed to implement the automatic COMSPEC directory feature!). See "Setting up CONFIG.SYS".

  • 4DOS can now load its resident portion and / or the master environment into DOS 5 UMBs. DOS 5 UMBs are used automatically if they are available and if UMB access is requested with the UMBLoad or UMBEnvironment directive in 4DOS.INI.

  • Swapping is now controlled by the Swapping directive in 4DOS.INI. You can use this directive to set up any sequence of swapping attempts you like (for example, you can tell 4DOS to try EMS, then your RAM disk, then XMS, then the hard disk). If no Swapping directive is used the default is to try EMS, then XMS, then the root directory of the boot drive if it is drive C: or higher. 4DOS will no longer attempt to swap to drive A: or B: by default (though you can tell it to if you want to). If all of these methods fail, 4DOS will load resident.

  • Most SETDOS settings can be initialized in the 4DOS.INI file. SETDOS settings are now inherited automatically in secondary shells, so you no longer need to put a SETDOS command into the 4START file to get the right settings in secondary shells.

  • The LOG state and log file name are now inherited by secondary shells, and may be set at boot time using the LogName directive in 4DOS.INI.

  • For BBS operators, the /F startup switch (or the CritFail directive in 4DOS.INI) generates an automatic "fail" response to all critical errors.


General Features


  • The PATH search is now faster by 50 - 100% depending on where the file is found in the path.

  • Secondary shells now require only about 1.7K of resident space (down from about 2.8K in version 3.03). The primary shell requirement is still 3K or less under most circumstances.

  • Description file processing has been sped up substantially, and should generate much less network traffic than before.

  • Directory displays in DIR and SELECT can now be colorized based on file extension or attributes. See "COLORDIR".

  • "Include lists" which allow you to specify multiple files with a single path were only available for the DIR and SELECT commands in 4DOS 3.03. In version 4.0 they have been extended to all 4DOS file processing commands, and the separator character has been changed to a semicolon. For example, the command:

copy d:\data\*.dat;*.txt a:

will copy the .DAT and .TXT files from D:\DATA to drive A:. See "Include Lists".

  • Wildcards have been enhanced so that you can specify lists or ranges of characters to include or exclude. For example [abf-h]*.* means all files whose names begin with a, b, f, g, or h. See "Wildcards".

  • 4DOS now performs variable expansion on the prompt string, so any environment variable, internal variable, or variable function can be put into the prompt and displayed.

  • When 4DOS exits from a shell it looks for and executes a 4EXIT.BAT or 4EXIT.BTM file (like the 4START file). This can be used to save history or perform other actions.

  • All upper case conversions (SETDOS /C1, DIR /C, @UPPER, etc.) now support international characters.

  • Executable extensions will now support internal commands, and they no longer require the full path name of an executable file. Also, executable extensions now support wildcards, including the new extended wildcards. For example, to set the program for all extensions starting with WK to 123:


             set .wk?=d:\123\123.com

  • A "." can now be used in the PATH to delay the search of the current directory.

  • Command grouping (originally an OS/2 feature) has been added to 4DOS. This allows you to use parentheses to group commands logically. This is a powerful feature, especially when used with the "prefix" commands like EXCEPT, FOR, GLOBAL, and SELECT.

  • 4DOS now supports Microsoft's command processor based message processing scheme for DOS external commands. If you enter a DOS external command with a bad argument (eg DEBUG XYZZY) in DOS 4 or above you will now get a real error message (eg "File not found") instead of a numerical message ("Extended error 2"). This feature adds about 200 bytes to the resident size of 4DOS, and can be disabled with the "MessageServer = No" directive in 4DOS.INI.


At the Command Line


  • The command history can now be viewed and executed from a popup window as well as at the command line.

  • "Automatic directory changes" let you change to a directory by typing its name followed by a backslash.

4DOS HELP System

  • The help system has been extensively revised. It now supports line by line scrolling, and scrolling and paging with the mouse follow industry standard conventions. The mouse can be used more easily to perform most help navigation functions.

  • The help text has been updated and expanded to cover all new 4DOS features as well as MS-DOS 5 external commands.

  • Help is now context sensitive. If you press F1 from the command line, 4DOS will try to find help for the first command on the line. If there is no help for that command, you will be put into the main HELP menu.

  • The help program has been renamed 4HELP.EXE to avoid conflicts with other HELP.EXE programs. This program is run when F1 is pressed at the command line or when the HELP command is executed. The help text file is now 4DOS.HLP (for those with a utility disk, the ASCII text file is 4DOS.TXT). The 4HELP, 4HELPF, and 4HELPC environment variables have been removed and replaced by the 4DOS.INI directives

HelpPath and HelpOptions.


  • The new HELP system is not compatible with the version 3.0 HELP system; if you have modified the version 3.0 HELP text you must purchase a version 4.0 Utility Disk and recompile your help text to use it with 4DOS 4.0 HELP.

  • HELPCFG now supports a /M switch to force it to run in monochrome mode and adjust the monochrome HELP colors, even on color systems. Also the HELPCFG exit keys have been changed to conform to general usage standards.


I/O Redirection


  • Added a new environment variable for directing where to create the temporary pipe files in 4DOS. 4DOS will first look for the environment variable TEMP4DOS; if it doesn't find it it will look for the (DOS 5 standard) TEMP variable; if it doesn't find that pipes will be created in the root directory of the boot disk.

  • Pipe names are now unique for each shell, to avoid conflicts when running pipes in different partitions under a multitasker.


Environment Variables, Internal Variables, and Variable Functions


There are many new environment variables, internal variables, and variable functions -- far too many to list here! This section just mentions a few highlights; see the manual for full details.

  • New environment variables used by 4DOS include CDPATH, COLORDIR, and TEMP4DOS. The old TMP has been changed to TEMP for DOS 5 compatibility. The old 4DSHELL variable has been eliminated, its functions are now provided by 4DOS.INI. One new variable (_CDPATH, as opposed to CDPATH) is described in MANMOD.DOC, but is not in the printed manual.

  • New internal variables let you access a broad range of information on system status and configuration. Some didn't make it into the manual: see the beginning of this file for information on _BOOT,_LASTDISK, _MOUSE, and _TRANSIENT.

  • In addition a very large number of variable functions have been added providing a wide array of new functions -- everything from available memory and disk space to menuing. A few of these functions didn't make it into the printed manual, so see the ASCII manual or MANMOD.DOC for information on @ALIAS, @DEVICE, @LINES, @MAKEDATE, @MAKETIME, @READSCR, and @SELECT, and some changes to @LINE, @SUBSTR, and @WORD.

  • Environment variable expansion will now handle nested variables in the form %[%var] (or even %[%[%var]]!).

  • There are some enhancements to specific variables and functions:


    • _DATE and _TIME: Return a leading zero if the first number in the date or time string is less than 10.

    • @EVAL: Now supports decimal places! Numbers can have up to 16 digits to the left of the decimal point and 8 to the right. Also %@EVAL now accepts commas in numbers.

    • @LINE: Now returns "**EOF**" at the end of the file. Also @LINE can now get its input from STDIN if you specify "con" as the filename**.

    • @SUBSTR: The last argument (the length of the string) is now optional; it will default to the remainder of the string**.

    • @WORD: Now allows you to return words from the end of the string**. For example %@word[-0,now is the time] returns "time", %@word[-2,now is the time] returns "is".




  • The command line can now grow to up to 512 bytes while an alias is being executed. The alias definition itself is still limited to 255 bytes.

  • "Key aliases" allow you to assign aliases to function keys and most Alt and Ctrl keys. See "Keystroke aliases".

  • QUIT can now be used in aliases.


Batch Files


  • GOSUB now saves the IFF state, so you can use IFF within subroutines without interfering with an IFF in the calling section of the batch file.

  • .BAT files have been sped up significantly, especially when executing internal commands (this speed increase applies only to .BAT files, not to .BTM files which are already much faster).


Command Changes


This section describes changes to 4DOS commands and new commands, but only briefly. It is intended to alert you to areas where your use of 4DOS commands may need to be changed, not to provide a comprehensive description. See the manual for full details.

  • ATTRIB: Added two new switches: /Q (quiet) and /S (process current directory and its subdirectories).

  • CANCEL: Now accepts an optional argument to set the ERRORLEVEL.

  • CD and CDD: These commands now use the CDPATH environment variable to find the subdirectory to change to. This allows changing to a subdirectory without typing its full path name. Also, CD and CDD now save the previous directory, and allow you to switch back to it with "CD -" or "CDD -".

  • CLS and COLOR: Can now set the screen border color, and will set colors with or without ANSI loaded. If ANSI is not loaded, the colors will not be "sticky" -- you may lose them when you run an application.

  • COPY: New switches include /C (copy changed files only), /H (copy hidden files), /N (do nothing, just test results of copy), and /S (copy files from the current directory and its subdirectories). /Q (quiet) now turns off the display of the number of files copied.

  • If you copy a file and the target file has a description but the source doesn't, 4DOS will now preserve the target description; this allows you to update files without losing the descriptions. A full destination disk during a COPY will now give an informative message, and stop the copy. COPY now preserves Hidden and System attributes (but not Read Only) when creating the target file.

  • DEL: New switches include /N (do nothing, just test results of DEL), /S (delete files from the current directory and its subdirectories), /X (remove empty subdirectories), and /Z (allow deletion of hidden, system, and read-only files). If you have a large number of files to delete you can increase deletion speed dramatically if you use the /Q switch and do NOT use 4DOS's extended wildcards in the file name.

  • DIR: (See additional section below on switch changes). Directory displays can now be colorized with COLORDIR. Free space displays will be correct even on JOINed, SUBSTed, or ASSIGNed drives in DOS 3.1 and above. File description handling has been sped up significantly. Directory names are displayed in square brackets [] for DOS 5 compatibility. If an argument begins with "\\", 4DOS will assume it's a network reference and will not try to get the volume label or disk space for that drive, to avoid network errors.

  • DIR Switches: Many switches have been changed for DOS 5 compatibility; a summary is below. DIR now supports the DOS 5 sort order switches (/O:[-degns]), as well as the original 4DOS switches (/O:[-eirtuz]). The new /O:a option sorts the directory in standard ASCII order rather than sorting filenames containing numbers in the default numerical order. A byproduct of the switch changes is that the /A:xxxx and /O:xxxx switches CANNOT be followed by another parameter without an intervening slash. For example, you used to be able to say DIR /OEP to display the directory in extension order with pauses. You must now use DIR /OE/P.


         Old Switch  Function                  New Switch

    ----------  ------------------------  ----------

    /1          Single column             no change

    /2          Two columns               no change

    /4          Four columns              no change

    /A          Display attributes        /T

    /C          Upper case                no change

    /D          Scan subdirectories       /S

    /F          Display files only        /A:-d

    /H          Display all files         /A

    /J          Justify file names        no change

    /N          Reset DIR options         no change

    /O          Sort order                see above

    /P          Pause at end of screen    no change

    /Q          Display file names only   /B

    /S          Display summary only      /U

    /V          Sort vertically           no change

    /W          Wide display              no change

    /X          Display directories only  /A:d

    New         Disable colorization      /D**

    New         Display full path names   /F

    New         Suppress header           /K

    New         Lower case                /L

    New         Suppress footer           /M

  • DRAWBOX: Added a new "shadow" option to create a transparent drop shadow for the box.

  • ECHOS: This is a new command which works just like an ECHO, but doesn't print a CR/LF at the end of a line. It's useful when redirecting output to a printer or other device.

  • ESET: The new /M switch makes the change to the master environment, not the local one.

  • EXIT can now accept and return a result code (error level) to the program that started a secondary shell.

  • FOR: The set to be processed can now be read from a file. The new /A: switch allows selection of files for processing based on attributes, using the same syntax as DIR /A**.

  • GLOBAL: Added switches /H (process hidden directories) and /P (prompt before executing the command in each directory)**.

  • GOTO: Added a /I switch which tells 4DOS to NOT cancel IFF processing. (Use only if you know EXACTLY what you're doing, and don't attempt to jump outside of the IFF or into a different IFF or IFF nesting level!)

  • HISTORY: Two switches were added: /A adds a command to the history list; /P pauses after displaying each page of the history.

  • IF and IFF: Most of the old tests for system resources (EMS, XMS, DISKFREE, etc.) have been moved to variable functions to make the information available throughout 4DOS rather than just in IF and IFF. You will need to edit your batch files or aliases if you used these tests in IF or IFF commands (see below). New conditional operators .AND., .OR., and .XOR. have been added. Some new tests have been added: ISINTERNAL tests if a string matches the name of an internal command; ISLABEL tests if a label exists in the current batch file**.

     Old IF / IFF test New Variable or Variable Function

----------------- ---------------------------------


VIDEO             %_VIDEO

ATTRIB            %@ATTRIB[filename,attrib]

DISKFREE          %@DISKFREE[d:,b|k|m]

DOSMEM            %@DOSMEM[b|k|m]

EMS               %@EMS[b|k|m]

EXTENDED          %@EXTENDED[b|k|m]

FILESIZE          %@FILESIZE[filename,b|k|m]

XMS               %@XMS[b|k|m]

  • INKEY: The new /K switch specifies the permissible keystrokes**.

  • KEYSTACK: Key names can be entered mnemonically, and delays can now be included in the keystroke sequence. The KEYSTACK.SYS device driver has been removed and replaced by a TSR, KSTACK.COM.

  • LH: New command added to support DOS 5's load high capability.

  • LIST: Now saves your position on a search or a print, and returns you to it after the print or an unsuccessful search. You can now toggle the high bit (/H) and line wrap (/W) flags from inside LIST, and /W(rap) now affects the P(rint) option.

  • LOADHIGH: New command added to support DOS 5's load high capability.

  • LOG: The LOG state and file name are now inherited by secondary shells. The log file name and/or path can be set with the LogName directive in 4DOS.INI** (using LogName does not turn logging on, you must still use LOG ON to do so).

  • MOVE: New switches include /C (move changed files only), /D (require that the destination be a directory), /H (move hidden files), /N (do nothing, just test results of move), and /S (move files from the current directory and its subdirectories). /Q (quiet) now turns off the display of the number of files copied. If you move a file and the target file has a description but the source doesn't, 4DOS will now preserve the target description; this allows you to update files without losing the descriptions. A full destination disk during a MOVE will now give an informative message, and stop the move.

  • PROMPT: Environment variables, internal variables, and variable functions can now be used from within the prompt, allowing you to include a wide variety of values in your prompt text.

  • QUIT: Now accepts an optional argument to set the ERRORLEVEL.

  • REBOOT: This is a new command which does a warm or cold boot, with an optional verification prompt. You need to test it on your system as some reboot methods do not work on all systems or with all other software.

  • REN has two new switches: /N (do nothing, just test results of rename); /S (allow subdirectory renames). Subdirectory renames are now disabled if wildcards are used in the old name, to avoid inadvertent renaming of directories; you can enable them with /S.

  • SELECT: There are some new switches and switch changes: /A selects files based on attribute (see DIR), /C displays in upper case, /D disables directory colorization**, and /O has the same changes as in DIR. A "*" now reverses the marks on all files, rather than simply marking all files -- for example, if you mark 3 files and then press '*' SELECT will unmark those three files and mark all the others. You can now unmark all of the marked files with a '/'.

  • SET: The new /M switch makes the change to the master environment, not the local one. The syntax has been changed to match COMMAND.COM: you MUST enter an '=' in a SET statement, and you may now put whitespace in the variable name or the argument. Also, if you enter SET VARNAME with nothing else on the line SET will now display the value of the variable, rather than removing it from the environment as it used to. To remove an environment variable, you must add the "=" sign to the end (e.g. SET VARNAME=), or use UNSET. Also note that, because whitespace in environment variable names and values is now preserved, batch files with lines like "SET MYVAR = MYVALUE" may not work unless they are changed to eliminate the extra spaces. Under 4DOS 3.03 this example would set "MYVAR" to "MYVALUE; under 4DOS 4.0 it will set "MYVAR " to " MYVALUE".

  • SETDOS: The /A option can now be set to tell 4DOS that ANSI is not loaded (/A2). The /H option has been removed; the minimum length of a command to save can be set with the HistMin option in 4DOS.INI. The /S option now uses percentages, not line counts, to set the cursor shape for insert and overstrike modes. The /V option can now be set to echo everything, even if echo is off (/V2)**.

  • SWAPPING: Now displays the current swapping type (EMS, XMS, Disk, or None) as well as the swapping state.

  • TIMER: There are now three timers available, selected with /1, /2, or /3. TIMER ON can be used to force a reset of the timer regardless of the current state.

  • TRUENAME: This is a new command which displays the true name of a file, even on ASSIGNed, JOINed, or SUBSTed drives.

  • UNSET: The new /M switch makes the change to the master environment, not the local one.

  • VER: The new /R switch displays the DOS revision level and location of the DOS kernel (DOS 5 only)**.

  • VSCRPUT: This is a new command which has the same parameters as SCRPUT, but displays the string vertically.

Technical Changes


These changes are primarily of interest to programmers and others interested in "how 4DOS works". Most users do not need to read this information.

  • New programming interfaces are included in version 4.0; see Appendix C of the manual for details. These include a new KEYSTACK interface, installable commands, and extended information in the DESCRIPT.ION file.

  • Full support for INT 2E is now provided. See the "Appendix C"  section of this file for details.

  • 4DOS now reserves all available DOS RAM while it is running at the prompt. This space is freed as needed for BTM files, DIR, LIST, SELECT, etc., and is always freed when starting an application. This mimics COMMAND.COM; we have implemented it to get around some odd behavior with loading certain networks or TSRs which depend on this approach.

  • 4DOS now detects a version mismatch with a previous shell and disables alias and history inheritance and reduced swapping if one isfound.

  • 4DOS now supports third-party INT 24 (critical error) handlers like 4DOS24H, and will no longer disable them when an unruly TSR unloads.

  • The 4DOS transient portion is now 100% dynamically relocatable. This means if you have a TSR that grabs a block from the end of DOS memory, 4DOS will dynamically relocate itself below the TSR when it swaps in after the TSR goes resident. The only thing you can't do is load such a TSR with swapping off, then turn swapping back on. If you do the results will not be good.

  • Reduced swapping is now enabled all the time. Starting a secondary shell under DESQView, or when alias or environment space is expanded, etc., will no longer result in a full-sized swap area. The only way to get a full-sized swap area in a secondary shell is to force it with the Reduce = NO directive in 4DOS.INI, or to load one version of 4DOS on top of another.

  • The maximum internal line size in 4DOS has been increased from 255 to 512 characters. The maximum command line length is still 255, but the increase in the internal buffer will allow you to have more complex aliases, variables, and command groups.

  • 4DOS will now "short-circuit" attempts by certain programs to do a "4DOS /C 4DOS" (ie load 4DOS and tell it to load itself again) when shelling to DOS. When this occurs 4DOS will only be loaded once.

Compatibility Changes:


This section gives a quick overview of changes to 4DOS 4.0 to enhance compatibility with other software. For details on any specific package see APPNOTES.DOC.


  • ANSI: 4DOS has improved ANSI detection and now will usually correctly detect whether ANSI is loaded regardless of whether ANSI or DOS is loaded high or low. If you have problems with ANSI detection use SETDOS /A or the ANSI directive in 4DOS.INI to tell 4DOS whether ANSI is installed.

  • APPEND: 4DOS sets APPEND's /PATH:OFF flag if using DOS 4 or DOS 5.  This will eliminate any attempt by APPEND to extend its searches in a way that interferes with 4DOS file access and file descriptions. DESQview: A Close Window command from within 4DOS will now release all resources (XMS, EMS, UMB, swap file, shell number, interrupts) owned by 4DOS before the window is closed, just as if you typed EXIT. 4DOS only performs this cleanup if you are actually in 4DOS when you issue the Close Window command. If you are in an application the cleanup will not occur.

  • DR-DOS: Several changes have been made for DR-DOS compatibility including access to 4DOS extended wildcards, and use of DR-DOS passwords (the ";" must be doubled on certain commands for this to work).

  • Novell Netware: Numerous changes have been made to improve Netware compatibility, especially with 4DOS redirection and batch files. Novell has also fixed bugs which would cause environment variables to be destroyed when logging in to the network under 4DOS. Also, you can now swap secondary shells to a network drive using the SwapReopen directive in 4DOS.INI.

  • Windows: 4DOS now detects Windows 3 and configures itself accordingly. At startup you will get a message: "4DOS running under Windows 3 in [Win3 mode]". There will be no message if you aren't running under Win3. Memory allocation in Win3 is now automatic, hence there is no need for the old /V switch.

Version 4.0b -- November 18, 1991

No changes found in the documents. Probably only internal bugfixes.


Version 4.01b -- June 8, 1992


General Features


  • Include lists can be up to 255 characters long (the previous limit was 79 characters).

  • External applications can now be invoked with extended parent directory names ("...\appname").

  • Drive changes will now save the old drive and directory so it can be retrieved with a "CDD -".

  • A new 4DOS.INI directive, DescriptionMax = nnnn, now controls the description length limit for DESCRIBE (the previous limit was fixed at 40 characters).  This will provide better support for 3rd-party description editors which support longer descriptions.  The default for DescriptionMax is 40 characters; the allowable range is 20 to 120 characters.  DESCRIBE will also allow editing of descriptions longer than DescriptionMax, but such descriptions cannot be lengthened. Descriptions displayed by DIR and SELECT are truncated at the screen width, with a right arrow at the end if the full description doesn't fit on the screen.

  • Lines in SET /R and ALIAS /R files, and aliases and variables edited by ESET, editing lines can all be up to 511 characters long.

  • The "Cancel batch file?" prompt is now sent to STDERR rather than STDOUT, in case batch output is redirected.

  • Prefacing an external command with a '@' will remove the old value of CMDLINE from the environment.  For folks who want to keep the environment small when loading TSRs. 

  • KSTACK has been rewritten with a different internal implementation. The external use is the same for both users (the KEYSTACK command) and programmers (the API for KSTACK).  The new version will not eat up CPU time in DESQview windows the way the old one did. Also some minor problems have been fixed, and KSTACK now releases its environment block at startup.

  • 4DOS now displays the true INI file name when an error occurs (previously "4DOS.INI" was displayed reagrdless of the actual name).

  • Variable expansion will now work when the variable is within an alias and is embedded in the first item on the line.  For example:

            c:\> alias mycopy=copy /r

            c:\> set xx=py

            c:\> myco%xx file1 a:

will copy file1 to drive A:, and prompt if the destination file already exists.

  • Added a new 4DOS startup switch, /K.  This switch does nothing, but all text after it is treated like a command, so using "/K command" at the end of the 4DOS command line is equivalent to including the "command" without /K.  This is equivalent to the 4OS2 /K switch, and is included for compatibility with the version of COMMAND.COM distributed with OS/2 2.0.  You can use either /K or /C before the command, but not both.

  • Several internal changes were made to provide better support for using 4DOS in OS/2 2.0 DOS sessions.


 Internal Variables and Variable Functions


  • %_DISK no longer generates a physical disk access.

  • %@ASCII[] now checks for an escape character preceding the actual character to process.  This allows quotes and other special characters as the argument (eg %@ASCII[^X`]).

  • %@FILESIZE now returns -1 on a non-existent file.

  • %@SELECT now supports input from CON (standard input).

  • Changed %@WORD to disable the / as a separator; now it will only use spaces, tabs, and commas.




  • ATTRIB:  Now has a /P(ause) switch to make it easier to display attributes for groups of files.

  • CALL:  Now returns an exit code (%_?) which matches the batch file exit code. This allows the use of conditionals (&& and ||) after CALL based on the batch file's exit code (eg from QUIT n) rather than whether the CALL command worked. 

  • COPY and MOVE:  When performed from an OS/2 session, these will now copy OS/2 extended attributes if the target file system supports them.  Also, /U and /R switches will now search for hidden and system files on the target.

  • DEL:  Now sets the internal error level (%_?) non-zero if no files were deleted.

  • ECHOS:  Output is now in binary "raw" mode (without CR to CRLF conversion etc.) to assist those using it to echo printer control strings.

  • IF and IFF:  Integer tests (i.e., "if 5 lt 12") have been modified to allow for - and +, so you can now test things like "if -1 lt 1".

  • INKEY:  Now translates the Enter key to its scan code (@28) to simplify detection of this keystroke.  Previously Enter was put into the environment as an ASCII 13, which wouldn't display, and which would be discarded as whitespace when the parser expanded the variable.

  • PROMPT:  Has a new symbol:  $r displays the return code of the last command.  This is for compatibility with COMMAND.COM under OS/2 2.0 which also provides this feature.

  • SETDOS:  Has a new /P switch to set the character used to specify all or all remaining command line arguments.  The default is '&' (as in "%&") for 4DOS and '$' (as in "%$") for 4OS2.  Use (for example) SETDOS /P$ to set the 4DOS character to match 4OS2.  Also see the ParameterChar directive below.

  • UNALIAS and UNSET:  Have a new /Q(uiet) option to disable error messages if the alias or variable does not exist.  This can be used to avoid annoying error messages from batch files which clear variables or aliases that may not be defined.

  • VER:  Now reports DR-DOS and OS/2 version numbers and revision levels when they are available.


Technical and Compatibility Changes


  • DR-DOS:  Added a DIREXIST condition (same as ISDIR) to IF and IFF for compatibility with DR-DOS 6 batch files.

  • OS/2:  4DOS will now search the true boot drive (as opposed to the current drive) for AUTOEXEC and other similar files when starting a primary shell in DOS 4 and above.  This should allow AUTOEXEC to run properly in OS/2 2.0 VDMs when starting the VDM on a drive different from the boot drive. Also, 4DOS changes the session title on the OS/2 desktop to the name of the application program when running an application in an OS/2 2.0 DOS session.  This behavior can be disabled with the ChangeTitle directive (see below). 

  • Novell Netware:  Worked around a Netware bug which allows the current directory to be deleted (and loses the disk mapping) when 4DOS does a DEL /X. 

  • The prompt interrupt (INT 2F, AX=D44E) is now issued just after a line is read (ie just after the CR), with BX=2.  This is in addition to the interrupts already done with BX=0 and 1 per appendix C of the manual.

  • 4DOS now allows multiple processes to redirect output to NUL simultaneously in multitaskers.

  • 4DOS now generates a "4DOS internal stack overflow" error if you attempt to nest batch files or commands like EXCEPT, FOR, IF, IFF, GLOBAL, or SELECT too deep, and 4DOS runs out of stack space.  In the past 4DOS could hang the system under these conditions.

  • The default stack size (set via the StackSize directive in 4DOS.INI)has been increased from 3584 to 4096 bytes.

  • Added the following new INI file directives.  Most of these directives are advanced directives, and should be changed only to solve unusual problems or for compatibility with the indicated software (eg NetwareNames for Novell Netware, or ParameterChar to make 4DOS and 4OS2 syntax the same).

  • ChangeTitle = YES | No:  Determines whether 4DOS changes the OS/2 session title when running an external program from an OS/2 2.0 DOS session.

  • CopyEA = YES | No:  Determines whether the 4DOS COPY and MOVE commands attempt to copy extended attributes when running in an OS/2 1.x or 2.0 DOS session. 

  • DiskReset = Yes | NO:  Enables or disables disk resets after COPY, MOVE, and RENAME, and before DIR.  Set to Yes if you have problems with disk change detection on non-standard or cached floppy disk drives, or with network software which doesn't always properly flush data to the disk.  However such problems are VERY rare and normally No is the best choice.  Setting DiskReset to Yes will reduce the performance of DIR, COPY, MOVE, and RENAME when using a "staged-write" disk cache such as SmartDrive 4.0.

  • DRSets = YES | No.  When running under DR-DOS, 4DOS will normally retrieve environment variables created by any SET commands in the DR-DOS CONFIG.SYS file and place them in the 4DOS master environment.  Set DRSets to No to disable this feature.

  • DVCleanup = YES | No.  No disables 4DOS's DESQview close window cleanup code and thereby reenables the Quit choice on the DESQview menu when at a 4DOS prompt.  However this will prevent 4DOS from cleaning up its resources (releasing the shell number and deleting any disk swap file) when you Close a 4DOS window from the DESQview menu, rather than with the EXIT command.

  • NetwareNames = Yes | NO.  Set to Yes to include strings in the resident portion of 4DOS which Netware searches for when it loads. NetwareNames should be set to Yes for Netware systems to avoid problems with destroyed environment variables during LOGIN. CAUTION:  If NetwareNames is set to Yes and you BOOT FROM a Netware drive (a rare situation), the TEMP4DOS or TEMP variables must be SET explicitly to the appropriate drive and directory for each user to avoid conflicts in the directory used for pipe files (if NetwareNames is not used or you boot from a local drive, 4DOS and Netware will automatically set the proper drive and directory for pipe files).

  • NextINIFile = File.  Full path and name must be specified.  All subsequent shells will read the specified INI file, and ignore any [Secondary] section in the original 4DOS.INI.  Intended to allow diskless or floppy-only workstation users to shift 4DOS.INI to a network drive for secondary shells, and avoid all access to the original boot drive.

  • ParameterChar = c.  Sets the character used to specify all or all remaining command line arguments.  Default is '&' (as in "%&") for 4DOS and '$' (as in "%$") for 4OS2.  Also see SETDOS /P above.

  • UniqueSwapName = Yes | No.  Set to Yes to change the disk swap file name from 4DOSSWAP.nnn to a unique name generated by 4DOS, with an extension of "4SW" (eg a1gd6nnw.4sw).  This prevents conflicts between swap files in different shells; it is only necessary when using disk swapping with a COMMAND.COM primary shell (eg if using Software Carousel) or in an OS/2 2.0 DOS session.  The default is Yes in OS/2 2.0 DOS sessions and No elsewhere.  UniqueSwapName only works in DOS 3.0 and above and applies only to disk swapping.


Bugs Fixed:




  • The sense of the MessageServer directive in 4DOS.INI was reversed.

  • The /F startup switch did not work unless there was also a CritFail=Yes in 4DOS.INI.


Command Line:


  • Ctrl-D in a history window did not work properly when using command completion.

  • An F8 or Shift-Tab at the beginning of a command line didn't preserve the trailing backslash for directory names from a previous F9 or Tab. 

  • Key remapping for standard ASCII keys (e.g. ListFind=S) only worked if upper case key was typed.

Environment Variables, Variable Functions, Batch Files, and Aliases:


  • Command grouping had a glitch when used after a conditional operator (&& or ||).

  • Batch variables of %10 and larger were not expanding correctly.

  • Variable expansion had trouble when used following a leading command group [e.g. (dir^memory) > %outfile].

  • Variable expansion crashed when an environment variable argument was over 255 characters long.

  • @DATE:  Did not work correctly with non-US date entries (i.e., yy-mm-dd or dd-mm-yy).

  • @FILESIZE:  Was not rounding properly when the k, K, m, or M units0 were used.

  • @SELECT:  Was allowing Ctrl-D but it did not work.  It is no longer allowed.  Also %@SELECT had trouble with 0-length files and very large (>64K) files. 




  • CANCEL:  Was failing to terminate succeeding commands on the same line in a parent batch file.

  • COPY:  Was not handling an append of the form COPY FU+NUL FU /B properly.

  • COPY and MOVE:  Would lose the first description if the target file had a description and the source didn't.

  • DEL:  /Q was not doing a fast (FCB-style) delete.

  • FOR:  (@filename) did not work correctly with long lines (>=80 characters).  The maximum line length now is 255 characters.

  • INKEY:  /K didn't work properly with variable names over 6 characters.

  • LIST:  /S had problems with very large (>64K) files when you hit an invalid key.

  • MEMORY:  did not display available XMS in an OS/2 2.0 VDM.

  • MOVE:  /D didn't work properly with multiple source arguments. Also MOVE did not preserve the read-only bit when moving a file to another drive. 

Version 4.01d -- September 30, 1992
No changes found in the documents. Probably only internal bugfixes.
Version 4.02 -- March 30, 1993


Startup and Initialization


  • Three new startup switches are now supported in 4DOS: ** /P[:]filename sets the path and file name for the AUTOEXEC file in the primary shell. This is equivalent to using the //AutoExecPath directive in 4DOS.INI. It is included for compatibility with the DOS_AUTOEXEC setting available under OS/2 2.1, and should not be needed elsewhere.

  • /D disables AUTOEXEC. A /D overrides AutoExecPath and /A (see above). This switch is intended for internal use by MS-DOS 6.0 when you use the F8 key at boot time, and answer "No" to the "Run AUTOEXEC" question.

  • /K[:]command: Run the specified command after 4DOS starts. 4DOS 4.01 supported this switch in OS/2 DOS sessions; it is now available in a standard DOS boot as well. For compatibility reasons, in a primary shell under MS-DOS 6.0, /K will execute the command INSTEAD of AUTOEXEC.BAT. However in other environments (DOS 5.0, OS/2 DOS sessions, etc.), /K will execute the command IN ADDITION to AUTOEXEC.

  • The 4DOS manual has never stated any required order for items on the startup command line. In order for command line switches to properly override items in the INI file, and in order for 4DOS to find the INI file, you should use the following order in the command tail:

- any "d:\path" for COMSPEC directory

- any explicit INI file name (@ininame)

- the /A, /E, /F, and /P switches, if used, in any order

- the /C or /K switch, if used

- any explicit startup command


(For more information on startup options, see your 4DOS manual.)

  • There are two new directives in 4DOS.INI: ** AmPm = Yes | NO | Auto: Yes tells 4DOS to display times in 12-hour format with a trailing "a" for AM or "p" for PM. The default of No formats times in military (24-hour) format. Auto formats the time according to the country code set for your system. The time format selected by AmPm applies to DIR and SELECT displays, LOG files, the output of TIMER, and the DATE and TIME commands. It does not affect %_TIME, %@MAKETIME, or PROMPT $t and $T.

  • BrightBG = Yes | No. Yes switches the video board to display bright background colors (rather than blinking foreground colors) within 4DOS (what happens within other programs is up to them). No switches to blinking foreground mode and disables bright backgrounds. The default if BrightBG is not used is to leave the video board in its current state and not adjust the mode at all. For further details before using BrightBG see the section on "Color Changes" below.

  • The AutoExecPath directive in 4DOS.INI can now specify a path, or a path and file name. Previously this directive could only include a path; the file name was always AUTOEXEC.BAT. Now, if a file name is included that file will be run instead of AUTOEXEC.BAT. If only a path is included, 4DOS will run AUTOEXEC.BAT from the specified directory. For example:




runs the file C:\MYDIR\AUTOEXEC.BAT when the system boots.


runs the specified file when the system boots.


This change allows you to put multiple startup files for different boot options or different OS/2 2.x DOS sessions into the same directory, and pick the file to be run by changing the AutoExecPath directive

  • The default setting for the FullINT2E directive in 4DOS.INI is now Yes. This increases 4DOS's default memory usage by about 100 bytes, but ensures compatibility with applications that use interrupt 2E. Only a few applications use interupt 2E to execute commands. If you don't run any such applications, you can save the space taken by interrupt 2E support by including a FullINT2E=No directive in 4DOS.INI.

  • 4DOS fully supports the MS-DOS 6.0 multiple configuration facility which allows menus in CONFIG.SYS. This includes support for SET statements in CONFIG.SYS, and for the CONFIG variable generated when CONFIG.SYS menus are used. Environment variables created from CONFIG.SYS will be available within AUTOEXEC and 4START when the primary 4DOS shell begins execution.


Color Changes


  • There are two general changes to color specifications in 4DOS 4.02. First, the DRAWBOX, DRAWHLINE, DRAWVLINE, SCRPUT, and VSCRPUT commands no longer accept border colors. Border colors did not always work as expected in these commands, and were never part of the documented syntax. To specify border colors you must use CLS or COLOR, or the StdColors directive in 4DOS.INI followed by a CLS. Second, bright background colors can now be specified in color settings on EGA and VGA systems. The remainder of this section describes the use of bright background colors.

    Bright background colors work only on EGA and VGA displays, and should not be used on other systems. They are an alternative to blinking text, and you must choose one or the other: if you enable bright backgrounds, displayed text will not blink, and vice versa.

    To use bright background colors, enable them with the BrightBG directive in 4DOS.INI (see Startup and Initialization changes above for details).

    The syntax of color specifications has been changed to support bright backgrounds. The full syntax is now:


             [BRIght] [BLInk] fg on [BRIght] bg


    This change applies to all commands which accept color specifications, and to all color directives in 4DOS.INI.


Technical Notes:


Bright background and blinking foreground colors use the same bit in the video board's registers. Therefore, you must have the BrightBG setting and your color specifications properly synchronized to get the desired result. With BrightBG = No, either "blink" or "bright [bg]" in the color specification will result in blinking text. With BrightBG = Yes, either specification will result in a bright background.


For example, these two color specifications will always produce the same result on the screen:

color blink white on blue

color white on bright blue

If BrightBG = No, the above statements will both result in the same blinking white text on a blue background. If BrightBG = Yes, they will both result in the same white text on a bright blue background.


Setting BrightBG may not be compatible with all video boards, but should work with standard EGA- and VGA-compatible systems. If BrightBG is set to Yes or No the video board bright background / blinking foreground state is set each time 4DOS displays the prompt. If BrightBG is not used the video board state is not adjusted at all. If you experience screen "flashes" at each prompt when BrightBG is used, then your video board probably is not compatible with the approach used by 4DOS's bright background support. In this case, leave the BrightBG statement out of 4DOS.INI altogether to eliminate the "flashes". This problem should be very rare and is not likely to occur on standard EGA and VGA systems.


Command Changes


  • DIR: The following switch changes were made, for compatibility with MS-DOS 6.0's DBLSPACE disk compression facility:


  • /C: The old /C (upper case display) switch has been changed to /E.

  • /C: Display per-file and total compression ratios on drives compressed with MS-DOS 6.0's DBLSPACE disk compression utility. The compression ratio is displayed instead of the file description. The ratio is left blank for directories and files with length 0, and for files on non-DBLSPACE drives. /C only works in single-column mode, and is ignored if /2, /4, or /W is used.

  • The numerator for the displayed compression ratio is the amount of space which would be allocated to the file on the DBLSPACE drive if it were not compressed, using the DBLSPACE drive's cluster size (normally 8K bytes). The denominator is the space actually allocated for the compressed file.

  • /CH: Display compression ratios like /C, but base the calculation on the host drive's cluster size. This gives a more accurate picture of the space saved through compression than is given by /C. PLEASE NOTE: /CH will occasionally display compression ratios slightly less than 1.0 to 1.0. This reflects files which have actually expanded when stored on the DBLSPACE drive. COMMAND.COM may display these ratios as 1.0 to 1.0, even if the true ratio is slightly less. 4DOS always displays the true ratio.

  • /O:c Sort by DBLSPACE compression ratio (the least compressed file in the list sorts first; the most compressed file sorts last). The sort can be reversed with /O:-c. For single-column directory displays, /O:c implies /C -- in other words, compression ratios will be displayed as well as used for the sort order. For wider displays (/2, /4, etc.) the ratios will be used to determine the order, but will not be displayed. If /O:c is used /O:i (sort by description) will be ignored. If /CH is used with /O:C the sort will be by compression ratios base don the host drive cluster size.

  • LH / LOADHIGH: Now support loading memory-resident programs into specific regions in upper memory. These new features are designed for compatibility with MS-DOS 6.0's COMMAND.COM, but will also work with MS-DOS 5.0 and in OS/2 2.0 VDMs. The full syntax for LH is now:       

 LH [/L:r1,n1;r2,n2;... /S] [d:][path]filename

To use the new upper memory region switches you must meet ALL of the following requirements:


- You must be running MS-DOS / PC-DOS 5.0 or above, or a DOS session under OS/2 2.0 or above.


- You must have one of the following memory management packages running:

EMM386 and HIMEM.SYS from MS-DOS / PC-DOS 5.0 or above;


386MAX from Qualitas; QEMM from Quarterdeck; or DOS session memory management under OS/2 2.x, with UMB support enabled (typically via the /UMB switch on the VXMS.SYS line in your OS/2 CONFIG.SYS file).


- You must have a DOS=HIGH,UMB or DOS=UMB statement in CONFIG.SYS; or under OS/2 2.x, you must have the DOS_UMB setting for the session set to "On".


The new LH / LOADHIGH options are:


Give the program access to upper memory region r1 if that region has at least n1 bytes available, to region r2 if it has at least n2 bytes available, and so on. If /L is not used, the program is given access to all upper memory regions. Region numbers beyond those that exist on your system will be ignored, with a warning. The figures for space required in each region (n1, n2, etc.) are rounded up to the nearest 16 bytes. If the free space in any region is less than the space required for that region, then the region will be locked out and unavailable to the program. If the required space value is left out the program is given access to the region regardless of the amount of free space available.

The program, its environment block, and any data allocated by the program, will be loaded only into the region(s) allowed by the /L switch; all other regions will be locked out and made unavailable to the program. If a program requests memory beyond that available to it in upper memory, DOS will normally allocate low memory (below 640K) to fulfill the request.


Regions are numbered beginning with 1. If you specify region 0 the program and its environment will be loaded into low memory, and any other region(s) specified will be available for allocation of program data. Any minimum size for region 0 will be ignored.


For example, for a simple load into region 2 only, regardless of the space available in that region:

LH /L:2 progname ...

For access to region 2 if it has 10000 bytes free, and region 3 if it has 15000 bytes free: LH /L:2,10000;3,15000 ...


/S: Shrink each specified region to the minimum available size before loading the program. If /S is not used all space in the specified region(s) is made available to the program. You can use /S to prevent a program from taking more than the minimum specified space in a particular region (e.g. to limit memory used by a cache that takes whatever memory it can get). For example, to load a cache program into low memory, give the program access to region 2 for data as long as there is at least 16K free in region 2, and also limit the program to using no more than that 16K:

LH /L:0;2,16384 /S mycache ...

The /S switch is intended for use by MS-DOS 6.0's MEMMAKER utility. It will not be especially useful for other purposes unless you are involved in complex manual adjustments to upper memory allocations, and have a thorough understanding of the memory allocation strategies used by the programs involved.


  • MOVE: MOVE now intercepts attempts to perform an infinitely recursive MOVE /S, and displays an error message.

  • SELECT: There are several switch changes to support MS-DOS 6.0's DBLSPACE disk compression. The upper case display switch has been changed to /E, and there is new compression support provided by /C, /CH, and /O:c. See DIR above for details.


Bugs Fixed


  • A /E:nnnn setting on the startup command line was not overriding an Environment= setting in the default 4DOS.INI file.

  • A /F on the startup command line was not overriding a CritFail=No in the default 4DOS.INI file.

  • 4DOS occasionally displayed an incorrect filename in error messages related to 4DOS.INI.

  • If there was no 4DOS.INI file in the directory with 4DOS.COM, 4DOS was sometimes looking for it in the root directory of that drive, rather than the documented location of the root directory of the boot drive.

  • The 4DOS PSP in upper memory was not chaining back to the low-memory PSP when UMBLoad was used. This fix should solve some very rare problems with programs that trace down the PSP chain.

  • Redirection was not properly backing up over an end of file mark (^Z) when appending to an existing file.

  • Filename completion could not handle illegal DOS filenames like OS/2's "EA DATA. SF" properly. (You still can't USE these filenames in commands, but they will no longer cause trouble with filename completion when you go past them.)

  • %_ALIAS and the MEMORY command did not agree as to the amount of free alias space.

  • When a prompt was displayed in a command with a /P switch (e.g. COPY /P), pressing a non-printing key would display garbage characters.

  • A bug in MS-DOS JOIN sometimes prevented 4DOS from correctly identifying JOINed directories as directories. We have worked around this bug.

  • COPY and MOVE: Occasionally would not properly handle attempts to copy OS/2 Extended Attributes to file systems that did not support them.

  • DEL /Q: Conflicted with include lists so that only the first file on the list was deleted.

  • EXCEPT: Using EXCEPT (*.) ... to prevent processing of files with no extension could cause problems in EXCEPT's handling of the directories "." and "..".

  • EXIT: 4EXIT would not always be run when EXITing from a batch file.  Also an infinite loop would occur if an EXIT command was included in 4EXIT.

  • LH / LOADHIGH: Fixed a problem which could very rarely cause a crash on return from a TSR loaded with LOADHIGH.

  • MOVE: Incorrect moves could occur when the source file was on a Netware Lite drive. These problems were due to network bugs, not 4DOS bugs; we have worked around the network problems.

  • SELECT: The displayed counter would overflow when tagging over 64MB of files.

  • Y: had several minor problems when used at the console.

Version 4.02b -- June 6, 1993

No changes found in the documents. Probably only internal bugfixes.


Top of Page - Home