The 4DOS command processor for MS-DOS

4dos, batch commands, grub 4 dos, dos 4, ms dos 4

Archive for September, 2010

LN.BTM – Adds and Removes Line Numbers

This is an update of a program I posted earlier that adds and removes
line numbers from ascii files.  The major difference is that this version
supports wildcards.  The syntax is still:

ln input [output]

where the output filename is optional.

                                        – David

———————- cut here ————————————
@echo off
unalias *
iff exist %1 then
        for %a in (%1) do gosub process
        echo %@upper[%@name[%0]].BTM – Adds and Removes Line Numbers
        echo Usage: %@upper[%0] input [output]
quit 0
iff "%@instr[0,18,%@line[%a,0]]"=="%@repeat[*,18]" then
        iff "%2"=="" then
                iff not exist %@substr[%@line[%a,0],21] then
                        set 2=%@substr[%@line[%a,0],21]
                        set 2=%@filename[%@unique[.]]
        on break goto error
        on error goto error
        set length=%@len[%@eval[%@lines[%a]+1] : ]
        if %length lt 7 set length=7
        set handle=%@fileopen[%a,read]
        set tmphnd=%@fileopen[%2,write]
        if %handle==-1 .or. %tmphnd==-1 goto error
        setdos /x-456
        do forever
                scrput +0 0 %_fg on %_bg Removing line numbers from %@filename[%a] +  Output file: %2
                set fl=%@fileread[%handle]
                if "%fl"=="**EOF**" leave
                if "%@instr[0,18,%fl]"=="%@repeat[*,18]" iterate
                if %@filewrite[%tmphnd,%@instr[%length,%@len[%fl],%fl]]==-1 goto error
                scrput +0 0 %_fg on %_bg Removing line numbers from %@filename[%a] *  Output file: %2
        setdos /x0
        if %@fileclose[%handle]==-1 goto error
        if %@fileclose[%tmphnd]==-1 goto error
        iff "%2"=="" then
                iff not exist %@name[%a].ln then
                        set 2=%@name[%a].ln
                        set 2=%@filename[%@unique[.]]
        echo Adding line numbers to %@filename[%a]  Output file: %2
        echo %@repeat[*,18] – %a > %2
        type /l %a >> %2
unset 2
setdos /x0
if exist %3 del /q %3
quit 1

posted by admin in Uncategorized and have No Comments

CommandSep = ^M ?

Is it possible to define Ctrl-M as Command Seperator ?
I have not been successful, neither with SETDOS /c^m
nor with CommandSep = ^M in 4dos.ini .


posted by admin in Uncategorized and have Comments (5)

Cannot Patch 4DOS

 > From: Will Estes <wes…@NETCOM.COM>
 > Subject:      Cannot patch 4dos 5.0c

 > I downloaded 4DOS 5.0 versions a-f from  I unzipped
 > A, then B, then C.  A contained the original 4DOS base, B
 > contained some modified HLP files (but no new, and C
 > contained some patch files.
 > After playing around with this some I loaded the new 4DOS and the
 > VER /R command returned revision F!  So why did JP stick this into
 > a file named 4DOS50A.ZIP, thereby implying that it was a revision
 > A file?
 > Whose bright idea was it to use patch files for this product?
 > Playing around with this mess of patch files and documentations
 > for different releases was a giant PITA.

Will …

I think next time you should read the index files available at our ftp site.
We do NOT use a distribution method which requires you to download a base rev
A file and then the patches to get to rev F.  I believe you got that
impression from a confused user of this list, but JP Software has never done
things that way because we know it causes just the sort of confusion you ran
into.  We DO keep the old patches there so that a user who downloaded an
older version can get all the way up to date.

The 4DOS50A.ZIP and 4DOS50B.ZIP are parts A and B of 4DOS 5.0 and always
contain the latest revision.  The files named 4D50B.ZIP, 4D50C.ZIP, etc. are
the patches.  All of this is explained carefully in the index file.

I’m sorry you found it confusing, but the ftp site only gives us one way to
describe the contents of our files so that you understand them, and that’s
with the index file.  If you don’t notice it and read it, I’m not sure
there’s anything else we can do given the technical capabilities available to
us for describing the files.

If you did read the index file, please let me know what you found confusing
about it — I wrote it, and I can change it easily enough!


                                                  … Tom Rawson
                                                      JP Software

posted by admin in Uncategorized and have Comment (1)

4DOS finds no high memory during startup

I’m running 4DOS V5 Rev E under MS-DOS 6.2 with Qemm V7.03 on a 386.
My problem is that when 4DOS starts up it does NOT put the environment
in Upper memory because it thinks that there is none avail. In fact there’s lots.
4DOS needs only 2K. It’s trying to find the memory before any of the
programs in AUTOEXEC.BAT get theirs and there’s 10K available after
everything’s loaded. 4DOS.INI has UMBLoad = yes, UMBEnvironment = Yes, and
Environment = 2048.

Any ideas?

Think to the future and beyond….

Justus J. Addiss, Sr. Software Engineer, 3M Health Information Systems
add…, 203-949-6414

posted by admin in Uncategorized and have Comments (3)

Windows text

Is there a option to turn off the information saying 4DOS running under
windows 386 Enhanced whenever you shell out of windows like the MSDOS option.

                               (o   o)
Henrik Gemal                                   E-mail: nage…
System Administrator                           Phone: (+45) 3815 2593
Institute of Economics                         Home:  (+45) 3253 2085
Copenhagen Business School                     Fax:   (+45) 3815 2565

posted by admin in Uncategorized and have Comment (1)

Loading 4DOS High

Is there any way, when loading 4DOS at system startup, to specify in
which upper memory region it should load to?

What I mean is, with MS-DOS 6.0, I can specify in my config.sys and
autoexec.bat the /L switch after any DEVICEHIGH or LOADHIGH commands.  
This tells DOS which region to load the program into.  It just so happens
that on my system, total perfection could be achieved if I could only
load 4DOS (both upper memory parts – not the part that’s always
conventional) into UMB region 2.  This would free up a crucial 4K of
memory in UMB region 1, so that I could then load other drivers.

However, the SHELL command takes no arguments and doesn’t appear
to have a switch that will perform this function.

So, my question is this: is there a better (or at least more flexible)
way to load the command interpreter into a specific region?

Thanks in advance for any help offered!

posted by admin in Uncategorized and have Comments (2)

read file(s)…


Can any person help me ???
I need a sourcecode from read a file in 4dos V5.0 Rev. ?

The programm read any file and extract the follow TEXTs on the screen…..

1.) Organization
2.) From:
3.) Subject:

not more…..

Can you help me…. ?!
Thanx for all                           Jochen

The best pilot in town…       I Internet        : sie…
See you soon…                 I Jochen Waibel / Germany

posted by admin in Uncategorized and have No Comments

Telemate Memory Problem

Can anyone here help me with my problem using the comm software,

When I exit that program, I get the message,
    "4DOS server error — Memory allocation error Fatal error —
     reboot the system or restart the session"

I have no idea how to solve this problem.  

Is there a place on the Internet where comm software is discussed?

Thanks in advance.
Don Rudolph  –  d…

posted by admin in Uncategorized and have Comments (2)

Can 4dos change file dates?

Hi all.

Does anyone know if it’s possible to change the file date/time
attributes of a file using 4dos commands or variable function
(without cludging it by, for example, changing the system time
and modifying the file).

I’ve looked everywhere in the docs, but it doesn’t look like
4dos can do it.  :-(

An inbuilt "touch" command would come in really handy!


 / _ \   Tony Nugent              Email:   T.Nug… \    _
 \_@) \  Griffith University      Brisbane Queensland Australia    \ (_@ \

posted by admin in Uncategorized and have Comments (5)

Re: Can 4dos change file dates

 | Subject:      Re: Can 4dos change file dates?
 | Date:         Wed, 20 Jul 1994 13:55:10 +0200
 | From: jschormann <juergen.schorm…@FERNUNI-HAGEN.DE>
 | Sender: owner-jps…


 | I think nobody wants to "cheat" his computer by changing the
 | timestamp but consider this:
 | I have some calls in my autoexec.bat to execute some programms
 | dayly, weekly or monthly. The programm I use to call these
 | programms looks exactly how many time has passed after the
 | last call.(It changes the timestamp of the programm it call to
 | remember the last call). So a day means 24 hours. When I boot
 | my computer on one day at 5.00 pm the first time and the next
 | day at 8.00 am the dayly programms will not start ’cause 24
 | hours have not passed. So I use a tool from norton utilities to
 | set the timestamp to 2.00 am after execution of the programms.
 | Since not everybody has norton utilities it would be a nice
 | build in feature for 4dos.

There are many ways to execute programs at a given date/time interval
without artificially changing a file’s timestamp.

A 4DOS batch file using existing commands (taking advantage of the internal
variables _DAY, _DOW, _MONTH, for instance), for instance, could readily do
the job and would not necessarily require any externals.  Even
may be able to do it, albeit more clumsily.

Obviously, for complex situations, an ad hoc utility would be best, as 4DOS
is after all "only" a command processor.

  Mike Bessy [IBMNET]                      07-20-94
  JP Software                              07:45 CDT

posted by admin in Uncategorized and have Comments (6)