A note about the future of ecsoft2.org

ecsoft2.org runs on software (Drupal 7 and PHP 7.4) that reached its end of life years ago and no longer receives security updates. Keeping the site online safely is getting harder.

Giving it a future means migrating it to a current platform — and that is only worth doing if people still use it and want to help keep it alive.

If you care about ecsoft2.org, as a user, a contributor, or someone willing to lend a hand, please ggambaattiscali [dot] it (get in touch) by January 31, 2027.

If no one comes forward by then, the site will be turned into a read-only archive, so that its content stays available.

4OS2 Command processor

Version: 
5.00.0
Release date: 
Thursday, 15 April, 2010

License:

Interface:

A free release of the 4OS2 command processor. This software is not supported by JP Software in any manner, neither is it officially supported by SciTech Software. For informal support see readme.1st file.

Along with JdeBP's 32-bit, 4OS2 is the most popular alternate command line interpreter for OS/2.

This software is distributed as compressed package. You have to download and manually install it; if prerequisites are required, you will have to manually install them too.

Manual installation

Program is distributed as ZIP package: download to temporary directory and unpack to destination folder. See below for download link(s).

Following ones are the download links for manual installation:

A formatter, analyzer, error-checker for 4OS2 BTM files v. 1.1 (8/11/2026, Anton Monroe) Readme/What's new
------------------------------------------------------------------ version 1.1 Sun Nov 8 2026 Format, Task_Indent: fixed puzzling bug when indenting ELSEIFF...THEN indent now based on IFF rather than THEN. How did it ever work before? Tue Nov 3 2026 Depends: spent several days improving output. The more I improve it the harder it is to find what is important in the clutter. Needs more thought. Added -depth switch to increase clutter. Rewrote CL_ClauseEOC/CL_AsString so it includes a function, even if the function contains another clause. Will see if it breaks anything. Wed Oct 28 2026 Toker: fixed tokenizing of IF <condition> ALIAS ... to identify alias definition also other minor improvements to tokeniser Format: also recapitalize alias/external commands; add switches for how to capitalize logical and comparison operators Sat Oct 24 2026 Task_Check: rewrote check for unbalanced parentheses Toker: fixed wrong type of '(' as W_CMD, should be W_( Wed Oct 21 2026 Task_Check: warn about CALL <label> that should be GOSUB <label> Tue Oct 20 2026 added some error-checking for things that should not happen. If you see a message like "does this ever happen?" I would like to know about it Toker: improved detection of '(' that is not part of a command grouping Thu Oct 15 2026 Depends, Task_CmdLists: fixed very repetitive output when %cmd is defined many times; use CL_AsString() to show args; fixed some minor cosmetic bugs Toker: fixed tokenising when [ and ] are not really part of a function Mon Oct 12 2026 Task_Check and Toker_do_Quote: check for missing " within alias definition Fri Oct 9 2026 improved documentation of Format options and fixed a couple of bugs related to switches I don't normally use Wed Sep 30 2026 Toker: fixed parsing of complex IF statements and ( in alias definitions Mon Sep 28 2026 Toker: tokenise backquoted alias definitions instead of calling them W_LITERAL. Added new class BACKQ and new token type W_`. This should make Depends and Unused commands more accurate. Other backquoted strings are still W_LITERAL, so in a case like *set foo=`%@execstr[foo.exe]` what is inside the backquotes still won't be seen. Sun Sep 27 2026 Unused: show unused aliases Fri Sep 25 2026 Toker: fixed a lot of tokenising bugs that should not affect anything that BTMTool.cmd is currently used for Fri Sep 18 2026 Depends: improved detection of external commands in things like detach 4os2.exe /c "foo.btm | sed.exe ..." but it probably still isn't perfect Thu Sep 17 2026 Toker: fixed tokenising of %= escape in quotes Tue Sep 15 2026 improved tokenising modes. The tokenising may be impossible to perfect, but it's much better than it was. Mon Sep 14 2026 Toker: added W_(( and W_)) types to distinguish between parentheses for command grouping and parentheses for other purposes Sun Sep 13 2026 Toker: fixed tokenising of "start ..." and "detach ..." Sat Sep 12 2026 Toker: fixed tokenising "if defined %varN" Sat Sep 12 2026 Toker: fixed tokenising of "set foo=%[stem_%tail]" and 1-character special vars Thu Sep 10 2026 Toker: fixed recognition of %%variableN after inkey/input Thu Sep 10 2026 Toker: fixed tokenising "for %fileN in (*.*)" where () is not a cmd group Wed Sep 2 2026 Toker: change simple mode char mapping for () to ss, so () are type W_SYMBOL after "echo". fixes "missing )" error. Wed Sep 2 2026 Toker: fix parsing of "%@instr[%varN,%%]" where %% should be type W_SYMBOL instead of W_%% Tue Sep 1 2026 Depends/Task_CmdLists: fixed parsing of "set /r %tmpfile", "alias /r %tmpfile" Tue Sep 1 2026 Depends/Task_CmdLists: in "call %cmd", count %cmd as external command/file Tue Aug 25 2026 Depends: do not count "unalias foo" as an external command foo Tue Aug 25 2026 Check: report unbalanced IFF/ENDIFF Mon Aug 17 2026 in Depends, count "for %var" as setting %var Fri Jul 24 2026 fixed: spurious warning about unbalanced backquote in multi-line string Sun Aug 24 2025 Format: divider was not resized if at token 2, first line of file Jul 26 2025 Toker: fixed tokenising of ) after echo ------------------------------------------------------------------
 hobbesgram.org/download/os2/util-12/shell-2/BTMTool_1-1.zip  local copy
4OS2 Command processor v. 5.00.0 (25/11/2025) Readme/What's new
Fixes and changes since last release ------------------------------------ 5.00.0 - Fix a trap on startup where the passed arg is a long pathname - Fix the use of an external command that has the same name as an internal command (e.i. echo.exe now runs the exe not the internal echo) - Correctly display EA size for EAs larger than 32k. - Fixed FFIND /R to search entire file - Provide full path to cmd file on command line generated by EXTPROC/#! - Improve handling of @WORDS when no separator list is included and the beginning of the string is quoted.
 www.hobbesarchive.com/Hobbes/pub/os2/util/shell/4os2_5.00.0.wpi  local copy
A formatter, analyzer, error-checker for 4OS2 BTM files v. 1.0.1 (22/7/2025, Anton Monroe) Readme/What's new
BTMTool.cmd: Awhile back I wrote a code analyzer/formatter/etc for Rexx scripts called RexxTool.cmd, and wondered if I could modify it to do the same sort of things with 4OS2 BTM scripts. BTMTool.cmd is the result. It took more modifying than I expected and it doesn't do as much as RexxTool.cmd, but it seems to be reliable at what it does. (RexxTool.cmd is available at hobbesarchive.com in the pub/os2/dev/proglang/rexx directory) indenter.btm is a 4OS2 batch file that is a front end to my Rexx and BTM formatters. I normally call it from a text editor, but it will work just as well from the command line. As in indenter.btm File.cmd It depends on a number of other programs that you probably have already-- grep.exe, expand.exe, diff.exe, eautil.exe. I also use a side-by-side file comparer called tfc.exe. I do not include it here but it is in the ZtreeBold package ztb194a5_upd.zip at hobbesarchive.com or as TadziosFileCompare_1-4.zip at hobbesarchive.com. You can to edit indenter.btm to suit yourself. send bug reports and feature requests to Anton Monroe
 www.hobbesarchive.com/Hobbes/pub/os2/util/shell/BTMTool_1-0-1.zip  local copy
4OS2 Command processor v. 3.11.0 (20/1/2022) Readme/What's new
Fixes and changes since last release ------------------------------------ 3.010 - Add /J switch to Copy and Move. Add CMDDirMvCpy INI key. These change the behavior for move and copy of a directory to match CMD (i.e. copy the directory not just the directory contents) - Add /Q to DIR command. It suppress non-fatal errors - Eliminate 4os2 beep when using Alt-Tab to access lSwitcher - Enhance NormalKey and NormalEditKey error message for keys which are excluded from use by 4OS2. (e.g. Atl-Tab, Ctrl-Esc) - Fix /ICON in START to avoid a SYS506 error. - Add Alias example file to package - Reorganize "What's New" section in help to place the latest changes at the top of the pages. - Fix @eawrite[] so it deletes EAs when a value isn't provided - Fix @eawrite and @earead to trim leading and trailing white space from EAnames. - Fix @words[] so it returns 0 - Added internal variable _TMSMP (Time Stamp) - Add INI key to specify 4 digit years and 2 digit 2 day should be displayed. - Add INI key to allow setting the Date Format. - Change the default jpstree.idx location to the 4OS2 directory with fall back to the root of the boot drive, - Hide LIBPATHSTRICT for environment list when it isn't set. - Fix Usage for the DIR and MOVE commands. - Fix deletion count when an unsuccessful attempt to abort occurs - Allow variables in the TEXT command. - Add INI key to prevent duplicates in the history. - Bypass internal help for message file help files with numbers in their names. - Fix options save to always write the new key to a new line. - Fix to always use an external command with the same name as an internal command if .exe is appended to it. - Add Shift-Ins paste. - Fix FOR switches so they can be grouped and placed in any order. This also fix a trap with some FOR command lines. - Fix REPLACE to accept an empty input string.
 ftp.netlabs.org/pub/4os2/4os2_3.11.GKY.exe  local copy
4OS2 Command processor v. 3.10pre (17/9/2021, Andreas Buchinger) Readme/What's new
Known problems -------------- None, but it is unlikely that there wouldn't be any. Fixes and changes since last release ------------------------------------ 3.09.1-shl (3.09.1 beta) - Avoid PMMERGE traps due to szSwtitle overflow - Sync memory command text to displayed values 3.09 (3.09 GA) - Set version number
 ftp.netlabs.org/pub/4os2/4os2_3.10.preAB.zip  local copy
4OS2 Command processor v. 3.09b (12/6/2020, Andreas Buchinger) Readme/What's new
Known problems -------------- None, but it is unlikely that there wouldn't be any. Fixes and changes since last release ------------------------------------ 3.08.4-shl (3.09 beta) - Correct memory DirHistory size display 3.08.3-shl (3.09 beta) - Ensure that 4os2 understands that given command lines like @ foo.exe @ is not an INI file indicator - Double max input line length to 2048, needed for compiling some QT4 stuff (by Andreas for Elbert) - Ensure command lines like @foo.exe do not treat foo.exe as an INI file - Ensure max length quoted pathnames handled correctly. - Correct ESET logic for BEGINLIBPATH etc. - Resolve list I command exception (ticket #20, changset 37507) - Support #! as EXTPROC equivalent if UnixPaths enabled - Default History and DirHistory to page multiples - Show DirHistory memory usage in memory command output - Update @makeage to be Y2K compliant
 ftp.netlabs.org/pub/4os2/4os2_3.09_AB_wpi.exe  local copy
4OS2 Command processor v. 3.08.4 (18/2/2018, Steven Levine) Readme/What's new
Fixes and changes since last release ------------------------------------ 3.08.4-shl (3.09 beta) - Correct memory DirHistory size display
 home.earthlink.net/~steve53//betas/4os2-3.08.4shl-2017-02-18.zip  local copy
4OS2 Command processor v. 3.08.3 (1/11/2013, Andreas Buchinger) Readme/What's new
3.08_3 - rereleased 3.08, only difference - 4start.cmd.sample added '.;' with CDPATH
 hobbes.nmsu.edu/download/pub/os2/util/shell/4os2_3.08_3.zip  local copy
Record updated last time on: 12/11/2026 - 06:08

Translate to...

Add new comment