Hubbry Logo
4DOS4DOSMain
Open search
4DOS
Community hub
4DOS
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
4DOS
4DOS
from Wikipedia

4DOS
DeveloperJP Software
Stable release
8.00 (Source available in 2009) / 7.50.130 (JPSoft in 2004)
Operating systemMS-DOS, Windows
TypeCommand shell
Licensemodified MIT License that does not qualify as open source by Open Source Initiative or Free Software Foundation standards
Website4dos.info

4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in MS-DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default, it has a large number of enhancements.

4OS2 and 4NT are similar products that replace cmd.exe in OS/2 and Windows NT respectively.

Overview

[edit]

4DOS is most often used as a command-line replacement for the following operating systems:

Since Windows NT and Windows 2000 includes both COMMAND.COM and cmd.exe, 4DOS and 4NT and derivatives can both be installed. Earlier versions of 4OS2 can be run under Windows NT, and OS/2 can run the two DOS and Windows NT shells, all three can be used on Windows NT-type machines and OS/2 multiple boot machines.

Among the many commands, statements and functions in 4DOS and lacking in DOS/Windows 95–98 COMMAND.COM are reading keyboard input and a simpler method of working with colors of screen and text.

The default file extension for 4DOS scripts is .btm.

A graphical version of 4DOS, 4OS2, and 4NT, called Take Command, was released with a feature set corresponding to version 4DOS 5.5, 4OS2, and 4NT 2.5 and updated after this. Development on this line stopped with the corresponding text mode versions. There was a graphical program Take Command/16, for Windows 3.1.

4OS2 is a similar replacement for IBM's OS/2 command interpreter. This was first released at the same time as 4DOS version 4, and has a similar feature set. Like 4DOS, this is released as open source. It appeared in the feature set of 2011's eComStation 2.10, in the freeware os2free project, and is included with ArcaOS.

4NT was first released as 4DOS for Windows NT (versions 1.x, 2.x), but became 4NT until the restructure after version 8. The program is a recompilation of 4OS2, and continues to have features of OS/2's command processor (cmd.exe), such as running REXX scripts, and EXTPROC support. A corresponding Take Command/32 exists for this, version 1 corresponding to 4NT 2.5. 4NT and Take Command/32 were released in both ANSI (Windows 9x) and Unicode (Windows NT) forms, with the ANSI version dropped at version 5.

A new Win32 program Tabbed Command Interface (TCI), was released at the time of 4NT version 7. This program allowed one to attach (thereby reducing screen clutter) and detach tabbed consoles to a single window. This program requires Windows XP or later.

A new version of Take Command extends the original Tabbed Command Interface, expanded with extra windows to allow input to be composed, to graphically navigate directories and files, and extra features. 4NT is bundled as Take Command Console. A light feature-reduced version of TCC is released as a free download.

JP Software then released:

  • TC (full pack of TCI + TCC)
  • TCLE (TCI + TCC/LE)
  • TCC (just the command utility)
  • TCC/LE

This has been released from versions 9 to 12.1, corresponding to the underlying 4NT/TCC version.

Features

[edit]

4DOS features a number of enhancements compared to COMMAND.COM:[1]

History and current status

[edit]

Originally distributed as shareware, 4DOS has been later released as unsupported freeware. Currently, the source code is available under a modified MIT License but it "may not be used in any commercial product without written permission from Rex C. Conn"[7] and "may not be compiled for use on any operating system other than FreeDOS" – so does not qualify as open source as defined by Open Source Initiative.[8][9]

The last update by JP Software was version 7.50.130, released in August 2004. During its 15-year history, 4DOS underwent numerous updates; here are a few of the most significant.

History and current status
Version Released New features
2.00 1989-02-15 Original release. Improved command-line editing, filename completion, command history, aliases, improved wildcards, online help, internal variables, swapping to disk or EMS, file descriptions,[2] command separator, key stacker.
2.20 1989-07-05 Executable extensions.
3.00 1990-03-07 BTM batch files (cached to memory for speed), extended memory (XMS) swapping, variable functions, bracket variable-name syntax.
4.00 1991-11-01 Colored directory listings, 4DOS.INI configuration file, include lists, command groups, implied CDD, DOS 5 Upper Memory Blocks (UMB) support.
5.00 1993-11-23 Date, time, and size ranges; compressed batch files.
5.51 1995-08-22 Long filename support, REXX in .BAT files (as in PC DOS 7.0).
6.00 1997-07-24 Extended directory searches, interactive configuration (OPTION command), exclusion ranges, interactive batch file debugger.
7.00 2001-06-18 @file lists (as in DR-DOS).
7.50 2003-02-24 User-defined functions.
7.50.1 2006-11-13 Source available version of 7.50. Luchezar Georgiev and Jaelani Utomo have continued developing 4DOS.[10]
8.00 2009-02-27 Latest version.[1]

NDOS

[edit]

Some versions of the Norton Utilities for DOS included modified copies of 4DOS called NDOS. The last version of NDOS was bundled with Norton Utilities 8, and corresponded to 4DOS 4.03.

See also

[edit]

Notes

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
4DOS is a command-line interpreter developed by JP Software as an enhanced replacement for the default MS-DOS command processor COMMAND.COM, providing expanded functionality, batch file processing, and user interface improvements for DOS-based systems. Originally conceived in 1986 by programmer Rex Conn, 4DOS saw its first public releases in 1988 via online forums, with the inaugural commercial version, 4DOS 2.0, launching on February 15, 1989. The software evolved through multiple iterations, reaching version 7.50 in 2004 as its final freeware release, after which it became open-source in 2006, culminating in version 8.00 in 2009 with community-driven enhancements for compatibility with FreeDOS. Developed primarily by Conn under JP Software, 4DOS was commercially successful for over a decade, addressing limitations in standard DOS shells by introducing more than 60 internal commands, aliases for common operations, and advanced batch scripting capabilities that executed 2-10 times faster than native DOS equivalents. Key features of 4DOS include a pop-up directory for quick navigation, multi-file operations for copying, moving, deleting, and listing, built-in file searching and viewing, command line editing with keystroke , and robust batch file support featuring subroutines, conditional statements like IF/THEN/ELSE and SWITCH, over 60 environment variables, and over 90 functions for complex automation. It also offered customizable prompts, color schemes, and a built-in debugger for batch files, making it a powerful tool for power users, system administrators, and developers in the DOS era. While officially unsupported today, 4DOS remains available for free download and continues to influence modern command-line tools through its successors, such as 4NT for Windows NT and the current Take Command Console (TCC).

Overview

Description

4DOS is a command-line interpreter developed by JP Software to replace the default command interpreter of , . It was primarily created by Rex Conn and Tom Rawson, who began development in 1986, with the first versions released in 1988 to users and the initial commercial release (version 2.0) occurring in 1989. The primary functions of 4DOS include interpreting user-entered commands, facilitating file and directory management operations, and acting as an interactive shell environment. It is designed for use with and compatible systems, including , where it enhances command-line interactions without conflicting with graphical interfaces. In terms of basic architecture, 4DOS loads into system memory as a replacement shell for , executing internal commands for faster performance compared to external utilities while also integrating seamlessly with standard DOS programs and external commands. This structure allows it to support advanced capabilities such as command aliases and history recall for improved user productivity.

Compatibility and Usage

4DOS demonstrates broad compatibility with legacy DOS-based systems, supporting versions from 2.0 through 6.22, PC-DOS, , and the DOS prompt in environments. It integrates seamlessly as a replacement for the standard shell in these platforms, leveraging standard DOS interrupts and environment variables for command interpretation. However, 4DOS cannot run natively on 64-bit modern operating systems due to their lack of 16-bit support, requiring emulation tools such as or to simulate a compatible DOS environment. Installation involves modifying system startup files to load as the primary shell. In , add or edit the SHELL= line to point to the full path of 4DOS.COM, such as SHELL=C:\4DOS\4DOS.COM, optionally including switches like /E:1024 for environment size allocation. For secondary shells launched from or applications, 4DOS inherits settings from the primary instance, though manual PATH updates may be needed to include the 4DOS directory (e.g., SET PATH=C:\DOS;C:\4DOS;%PATH%). Memory requirements are modest, typically occupying 40-60 KB of depending on version and configuration, with support for swapping transient portions to XMS, EMS, or disk to minimize base memory usage. Post-installation, fine-tune behavior through the file, which controls options like UMB loading for environment and history buffers. In practice, 4DOS functions as an enhanced primary shell for power users, facilitating advanced scripting, automation, and command-line productivity in resource-constrained pre-Windows setups. It excels in environments like workstations for file management, network tasks under Novell NetWare, or custom automation scripts, offering greater flexibility than the default without requiring additional hardware. Common troubleshooting addresses issues unique to DOS shells, such as memory conflicts arising from TSR programs or memory managers like QEMM, which can be resolved by enabling UMBLoad=Yes in 4DOS.INI to relocate non-resident portions high, or using the OPTION command to adjust swap parameters. Path-related problems, often manifesting as "command not found" errors for 4DOS-specific utilities like KSTACK.COM, are typically fixed by verifying the PATH includes the installation directory and rebooting after CONFIG.SYS changes; if conflicts persist with , manually set to the 4DOS path in .

Features

Command-Line Enhancements

4DOS significantly extends the functionality of standard DOS internal commands, providing greater flexibility and efficiency for interactive command-line operations. The DIR command, for instance, supports display in multiple columns (such as 1, 2, 4, or 5 via the /2 switch) and allows multiple wildcard sets for precise file selection, enabling users to list files matching patterns like .txt;.doc in a single invocation. Additionally, commands like COPY and MOVE incorporate advanced filtering options based on file attributes such as size, date, and time; for example, COPY can selectively transfer files modified within the last seven days using /[d-7] . as a parameter. These enhancements include support for wildcards in verification processes, ensuring data integrity during operations without relying on external utilities. The alias system in 4DOS allows users to create shorthand commands for frequently used sequences, streamlining interactive sessions. Simple aliases map short names to full commands, such as aliasing "d" to "dir" or "ll" to "dir /w" for a wide directory listing. More complex aliases can chain multiple commands using the caret (^) as a separator, like "monthly" defined as pushd c:\monthly ^ finproc ^ popd, which automates directory changes and program execution. Aliases are defined via the ALIAS command and can be saved persistently for reuse across sessions. Support for variables and functions further bolsters command-line logic and manipulation. Environment variables provide access to system information, such as %_date for the current date and %_time for the time, which can be referenced directly in commands. Built-in functions enable conditional execution and string processing; @IF evaluates conditions for branching, @ERRORLEVEL retrieves the exit status of the previous command to check for success or failure, @UPPER converts strings to uppercase, and @LEN returns the length of a string. These tools allow for dynamic command construction, such as using @IF [%ERRORLEVEL] NEQ 0 to handle outcomes without external scripting. Error handling is integrated through robust redirection and suppression mechanisms, promoting reliable interactive use. 4DOS enhances I/O redirection to include standard output, , or both simultaneously, with options to append to files or direct to multiple destinations; for example, command >& filename redirects both streams to a single file. The /F startup switch automatically provides a fail response to critical errors without prompting, useful for automated environments, while @ERRORLEVEL facilitates programmatic responses to errors. and redirection also support advanced batch integration for error logging.

Batch Processing Capabilities

4DOS significantly enhances functionality by introducing elements absent in standard DOS . The IFF-THEN-ELSE-ENDIF construct allows for multi-line conditional statements, supporting logical operators such as .AND., .OR., and .XOR. for evaluating complex conditions like file existence or variable values. Subroutines are implemented using GOSUB to jump to a labeled section and RETURN to resume execution, promoting code reusability and within scripts. Loops are enabled through DO and ENDDO commands, which support iteration over numeric ranges (e.g., DO i=1 TO 10), conditional termination (e.g., DO WHILE %free > 1000), or file sets (e.g., DO f IN *.txt), with nesting up to 15 levels deep. These features enable the creation of sophisticated, readable s for tasks. Batch files in 4DOS incorporate advanced operations for greater interactivity and dynamism. The @INPUT command prompts users for responses and stores them in variables (e.g., @INPUT Enter filename: %file), facilitating user-driven scripts without external tools. For output, @FILEWRITE allows appending or creating content in files dynamically, often combined with expansion (e.g., @FILEWRITE log.txt %timestamp: Data processed), surpassing the basic redirection limitations of standard DOS. Such capabilities support the generation of reports, logs, or configuration files on the fly during execution. Performance optimizations in 4DOS stem from its internal command interpreter, which executes scripts 5 to 10 times faster than traditional batches by reducing disk I/O and leveraging compiled-like parsing with minimal overhead. Internal functions like @EVAL for arithmetic operations further accelerate computations without invoking external executables, making complex scripts viable on resource-constrained systems. Practical applications include automated backups, where a loop might copy modified files:

DO f IN *.* IF EXIST d:\backup\%f COPY %f d:\backup\ ENDDO

DO f IN *.* IF EXIST d:\backup\%f COPY %f d:\backup\ ENDDO

This ensures selective archiving based on existence checks. System maintenance scripts can use conditional logic to clean temporary files, such as:

IFF %diskfree[C:] < 10000 THEN DEL /S C:\*.tmp ENDIF

IFF %diskfree[C:] < 10000 THEN DEL /S C:\*.tmp ENDIF

These examples highlight 4DOS's role in efficient, error-handling automation. Command aliases can be integrated into batches for shorthand invocation of repetitive sequences.

User Interface and Productivity Tools

4DOS enhances the through a suite of interactive tools designed to streamline command-line operations and reduce typing errors. These features include advanced command recall mechanisms, visual navigation aids, and flexible prompt configurations, all integrated directly into the shell for seamless usability. By providing mnemonic shortcuts and pop-up interfaces, 4DOS transforms the standard DOS command environment into a more efficient and user-friendly system. One key productivity tool is the command history feature, which records executed commands for quick recall and editing. Users can navigate through previous commands using the up and down to cycle sequentially on the command line, or press PgUp to open a pop-up window displaying the full list for selection via and Enter. This allows for easy reuse or modification of prior inputs without retyping, supporting both local session and optional global sharing across sessions when 4DOS is set as the primary shell. Additionally, the buffer can be configured via the HISTORY command to adjust size and behavior, such as enabling persistent storage in a file. For directory navigation, 4DOS offers a pop-up directory history that maintains a list of recently visited directories, accessible without interrupting the current command line. Pressing Ctrl-PgUp displays a pop-up listing prior directories, where users can select one with and Enter to change to it instantly. This tool complements file completion by also supporting partial directory name entry followed by Tab for auto-completion or F7 for a pop-up list of matching directories and files in the current path. Such visual aids minimize navigation time, especially in deeply nested directory structures. Prompt customization in 4DOS allows users to create dynamic, informative command prompts beyond the standard DOS format. Using the PROMPT command, users can incorporate special variables such as dforthecurrentdate,d for the current date, t for time, pforthecurrentdirectorypath,andp for the current directory path, and v for the DOS version, combined with 4DOS-specific codes or ANSI codes for color and formatting. For example, a prompt like "dd t [$p]gg v" displays date, time, directory, greater-than symbol, and DOS version on each line, updating in real-time to provide contextual awareness. This extensibility integrates briefly with prompts for consistent scripting environments. Keystroke enhancements further boost productivity by emulating Emacs-style line editing directly on the command line. Common bindings include Ctrl-A to move to the beginning of the line, Ctrl-E to the end, Ctrl-F and Ctrl-B for forward and backward character movement, and Ctrl-D or for deletion, allowing precise editing as in a . Function keys can be customized via the KEY command to assign macros or frequent tasks, such as F1 for help or user-defined aliases, with up to 20 keys programmable for personalized workflows. These features, combined with Tab-based completion, enable efficient command construction and reduce reliance on external editors.

Development and History

Origins and Early Development

4DOS originated from the efforts of Rex Conn, who began developing it in 1986 to provide a more capable alternative to the standard command interpreter, , which suffered from inadequate support and lacked features like command aliases. The project was motivated by frustrations among power users and consultants with the limitations of DOS shells in versions 3.x and 4.x, aiming to create an enhanced environment that extended command-line functionality without requiring users to abandon familiar DOS workflows. This "fourth-generation" design philosophy sought to evolve the command interpreter into a more versatile tool, incorporating advanced scripting and customization options to boost productivity. In 1988, Conn released early versions (1.x) of 4DOS exclusively to the consultants forum, where it was tested and refined as among a select group of users. These initial distributions focused on core enhancements to existing DOS commands, such as improved file handling and directory navigation, while maintaining full compatibility with environments. The software's low overhead and speed were achieved through its implementation in , ensuring it fit within the memory constraints of contemporary PCs. JP Software was established by Rex Conn and co-developer Tom Rawson around this period to formalize the project's commercialization, leading to the first public release of in as distributed via bulletin boards and direct sales. This marked the transition from beta testing to broader availability, positioning 4DOS as a viable replacement for in professional and hobbyist settings.

Version Evolution

4DOS's development progressed through several major versions, each introducing enhancements to command processing, , and compatibility with evolving DOS environments. Version 3.0, released on March 7, 1990, marked a significant rewrite of the core 4DOS.COM file, reducing its low memory footprint to under 3 KB from approximately 5 KB in prior releases. This version introduced support for swapping to XMS (requiring or equivalent), pop-up help accessible via the F1 key (using the companion HELP.EXE utility), and in-memory batch files via .BTM extensions. It also added internal variables like %_CPU for processor type and %? for command error levels, along with an alias expansion buffer configurable up to a specified size. Subsequent updates in the 3.x series refined stability and compatibility. Version 3.01, released May 22, 1990, improved disk swapping reliability and introduced the %@EVAL function for arithmetic expressions in variables. Version 3.02 (September 7, 1990) added detection via %_NDP and string case conversion functions %@UPPER and %@LOWER. The final 3.x release, 3.03 on April 12, 1991, preserved leading whitespace in external command invocations, allowed numeric arguments for EXIT to set error levels, and supported European date formats. These changes addressed early user feedback on usability and integration with DOS 3.x and 4.x systems. Version 4.0, released November 1, 1991, consolidated 4DOS into a single executable file (4DOS.COM) configurable via 4DOS.INI, eliminating the need for multiple components. It introduced a suite of @functions, including @ALIAS for alias expansion, @DEVICE for device queries, @LINES for screen rows, @MAKEDATE and @MAKETIME for , @READSCR for screen reading, and @SELECT for . Additional enhancements included faster PATH searches, colorized output in DIR and SELECT commands, extended wildcard support with command grouping, and variable expansion within prompts. Memory optimizations supported DOS 5 upper memory blocks (UMBs), reducing the secondary shell footprint to 1.7 KB. Later 4.x updates, such as 4.01b (June 8, 1992), extended include lists to 255 characters and improved @FILESIZE handling for non-existent files, while 4.02 (March 30, 1993) added startup switches like /P for prompt preservation and supported DBLSPACE compression in directory listings. The 5.x series, beginning with version 5.0 on November 23, 1993, focused on and file management expansions, including longer file descriptions and enhanced utility integration. Version 5.5, released October 12, 1994, provided improved compatibility with 6.x features, such as upper memory optimization and double-space compression handling, while preparing for emerging conventions in anticipation of Windows 95. It included a full reference manual and refined batch execution for better performance under multitasking environments like DESQview. Version 6.0, released July 24, 1997, incorporated scripting support for advanced batch automation and bundled text editor for user convenience. This release optimized for larger storage media and added functions for network-aware operations, responding to the growing use of FAT16 volumes in late-1990s DOS setups. The 7.x lineage culminated in version 7.0 on June 18, 2001, with refinements to variable handling and error reporting, followed by 7.01A on December 14, 2001, addressing minor compatibility issues with DOS sessions. Version 7.50, released August 26, 2004, served as the final commercial update, incorporating bug fixes for FAT32 volume display and queries exceeding 64 MB via @EXTENDED. This build ensured proper handling of drive space on modernized DOS variants like and PTS-DOS, including accurate reporting for FAT32 partitions. Following the 2004 freeware release of 7.50, active commercial development of 4DOS ceased as JP Software shifted focus to Windows-based products like 4NT and Take Command. An open-source adaptation, version 8.0 (build 200) on February 27, 2009, targeted integration, adding functions such as SETERROR for explicit error level setting, @ISLOWER, and @ISUPPER for character case checks, alongside improved handling for systems beyond 64 MB. This marked the transition from proprietary updates to community-maintained enhancements.

Licensing and Variants

4DOS was distributed as beginning with in 1989, requiring users to register with JP Software to unlock full features and receive ongoing support. Registered users paid a fee—typically around $70 for later versions such as 6.01—and in return gained access to complete , upgrade notifications, and The Prompt Solution, JP Software's newsletter featuring usage tips, enhancement details, and product updates. A notable variant, NDOS, emerged from a licensing agreement between JP Software and Symantec in 1991, integrating an adapted version of 4DOS into as a replacement. NDOS 7.01, for instance, was based on 4DOS 4.0 and included Symantec-specific enhancements such as integrated cleanup and diagnostic tools tailored to Norton's suite. Other NDOS releases followed this pattern, with versions like NDOS 6.01 derived from 4DOS 3.0 and NDOS 8.00 from 4DOS 4.03, but remained commercial and bundled exclusively with Norton products. Beyond NDOS, 4DOS saw limited adaptations, including minor OEM versions customized for specific hardware configurations, though these were not widely documented or distributed independently. JP Software retained trademarks and rights throughout, preventing unauthorized modifications. In the mid-2000s, the company transitioned 4DOS to status without releasing the source code; version 7.50, the final update, became freely available starting August 26, 2004, allowing unrestricted binary distribution while maintaining elements. A specialized open-source release of version 7.50.1 occurred in 2006 exclusively for the project, but the core codebase remained closed.

Legacy and Successors

Impact on Command-Line Tools

4DOS's innovative features, particularly its alias system for abbreviating complex commands and its command-line editing capabilities, provided a foundation for enhanced functionality in subsequent command-line interpreters. These elements influenced the evolution of JP Software's own 4NT shell for , which incorporated similar mechanisms to improve upon the basic , thereby extending 4DOS's productivity enhancements into the Windows era. In the , 4DOS achieved notable adoption among system administrators, programmers, and power users frustrated with the limitations of the default , becoming a staple in distributions and professional computing environments. Its model facilitated broad dissemination through networks like and systems, fostering a dedicated user community that valued its reliability for daily tasks. The shell's contributions to batch scripting were profound, standardizing advanced DOS automation through the addition of over 60 internal commands, including conditional structures, subroutines, and variable manipulation functions—features that enabled sophisticated scripts executing 2 to 10 times faster than native DOS equivalents. This reduced dependence on disparate third-party utilities for tasks like file management and system configuration, empowering users to create reusable, efficient automation routines directly within the shell. Culturally, 4DOS holds a revered place in retro circles for exemplifying power-user efficiency during the DOS era, frequently praised in enthusiast forums and archives for transforming the command line into a versatile toolset far superior to COMMAND.COM's rudimentary design. Its legacy endures through emulation in tools like , where it remains a preferred choice for recreating authentic 1990s workflows and highlighting the era's command-line ingenuity.

Modern Adaptations and Availability

Following the decline of in the mid-1990s, JP Software transitioned 4DOS's core features into successors tailored for modern Windows environments, beginning with 4NT released in 1993 as a command-line interpreter for , which later evolved into Take Command Console (TCC). TCC, available in both 32-bit and 64-bit variants, retains enhanced , , and file management capabilities from 4DOS while supporting compatibility and integration with Windows scripting hosts. These tools are actively maintained by JP Software and serve as the primary modern implementations of 4DOS's design principles for command-line productivity. On contemporary operating systems lacking native DOS support, 4DOS can be emulated using tools like for x86 emulation, vDOS for seamless Windows integration, or as a lightweight DOS kernel. For 64-bit Windows, community scripts leverage vDOS to launch 4DOS sessions and 16-bit applications via shortcuts, enabling direct access without full virtualization overhead. 4DOS has been distributed as since 2004, with version 7.50 as the final official release from JP Software, available via their FTP archives; a community-maintained open-source version 8.00 from 2009 extends compatibility for environments. No further official updates have occurred, but community support persists through JP Software's forums for and configuration advice. Today, 4DOS finds niche applications in retro gaming setups via to enhance command-line scripting for classic titles, embedded systems running for resource-constrained devices, and educational contexts teaching foundational command-line operations.
Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.