Category : Utilities for DOS and Windows Machines
Archive   : 4UTILS83.ZIP
Filename : 4UTILS.DOC

Output of file : 4UTILS.DOC contained in archive : 4UTILS83.ZIP

4 4 U U T I L S
4 4 U U T I L S
4 4 U U T I L SSS
44444 U U T I L S
4 U U T I L S
4 U U T I L S

4UTILS - A small 4DOS Utility Collection

Binary created using Turbo Pascal 7.0 (c) Borland International 1992

Note: This document has been formatted and is ready for printing.
(60 lines per page, up to 75 characters per line.)

Table of contents:

0. Legal Status, Warranty ............................... 2
1. Distribution Policy .................................. 2
2. Introduction ......................................... 3
3. Getting started ...................................... 4
4. 4DESC - a simple 4DOS-description editor ............. 5
4.1 Command line switches and parameters ................ 5
4.2 Editing and changing descriptions ................... 5
5. 4FF - a simple file finder ......................... 7
5.1 Command line switches and parameters ................ 7
6. Customizing 4DESC and 4FF - the 4UTILS.INI file ...... 9
7. (Re)Compiling 4DESC or 4FF............................12
8. Bugs and Comments.....................................13
9. How to reach the authors..............................15
10. Acknowledgements......................................15

4UTILS - A small 4DOS Utility Collection Page 1

0. Legal Status, Warranty

º º
º Since 4UTILS is licensed free of charge, the authors, David Frey º
º and Tom Bowden, provide absolutely no warranty of any kind, either º
º expressed or implied, including, but not limited to, the implied º
º warranties of fitness for a particular purpose. º
º º
º 4UTILS is provided "as is"; the entire risk as to the quality and º
º performance of the program is with you. Should the program prove º
º defective, you assume the cost of all necessary servicing, repair º
º or correction. º
º º
º In no event will any copyright holder, or any other party who may º
º modify and/or redistribute the program as permitted below, be liable º
º to you for damages, including any general, special, incidental º
º or consequential damages arising out of the use or inability to use º
º the program (including but not limited to loss of data or data being º
º rendered inaccurate or losses sustained by you or third parties or a º
º failure of the program to operate with any other programs), even if º
º such holder or other party has been advised of the possibility of º
º such damages. º
º º

These programs are freeware: you are allowed to use, copy and change them
free of charge, when the following conditions are met:

* 4DESC or 4FF may not be sold or hired.

* Never change copyright statements: the copyright remains in our hands.

* If you make any (considerable) changes to the source code, please let
us know (send us a copy or a listing). We would like to see what you
have done.

1. Distribution Policy

You can distribute these utilities under the following conditions:

* You ask no contribution from the receiver of this package except
from a nominal copying charge not to exceed US $6. (SFr. 10).

4UTILS - A small 4DOS Utility Collection Page 2

* This archive must be left intact. (repacking allowed). That means the
receiver of this package must receive the following files:

Length Method Size Ratio Date Time CRC-32 Name
------ ------ ---- ----- ---- ---- ------ ----
47872 Deflate 24064 50% 28-04-94 17:30 5a3a551e ^4desc.exe
37494 Deflate 8708 77% 28-04-94 17:30 85696b9f ^4desc.pas
1799 Deflate 817 55% 28-04-94 17:30 fe0cdf9e ^4desc.txt
48096 Deflate 24029 50% 28-04-94 17:30 a4ae097f ^4desc86.exe
44192 Deflate 20605 53% 28-04-94 18:20 819b032a ^4ff.exe
14420 Deflate 4434 69% 28-04-94 18:20 a08feb6c ^4ff.pas
1763 Deflate 763 57% 28-04-94 18:20 c7abaa2a ^4ff.txt
44336 Deflate 20598 54% 28-04-94 18:20 302f8044 ^4ff86.exe
32016 Deflate 11103 65% 28-04-94 17:30 b4bd4ce2 ^4utils.doc
4023 Deflate 1584 61% 28-04-94 17:20 2d5a4fee ^4utils.smp
2004 Deflate 583 71% 28-04-94 17:30 80e9b312 ^desc.btm
21974 Deflate 6117 72% 28-04-94 17:30 1062564e ^descript.pas
12229 Deflate 3692 70% 28-04-94 17:30 f030d6e2 ^displayk.pas
3195 Deflate 1239 61% 28-04-94 17:20 1f60796b ^dmouse.pas
401 Deflate 274 32% 28-04-94 17:30 e8e25787 ^file_id.diz
2154 Deflate 977 55% 28-04-94 17:30 5b9037bd ^fix.pas
5708 Deflate 2072 64% 28-04-94 18:20 68cd1f3d ^globals.pas
8497 Deflate 2856 66% 28-04-94 17:30 f11584a6 ^handlein.pas
1763 Deflate 637 64% 28-04-94 17:30 42c768bd ^packing.lst
9616 Deflate 2978 69% 28-04-94 18:20 275f4330 ^scanarjf.pas
6460 Deflate 1970 70% 28-04-94 18:20 2d08a334 ^scanlzhf.pas
9127 Deflate 2523 72% 28-04-94 18:20 7603939c ^scanzipf.pas
13491 Deflate 3342 75% 28-04-94 17:30 a37178e8 ^stringda.pas
3425 Deflate 1573 54% 28-04-94 17:30 e74f73ed ^
------ ------ --- -------
376055 147538 61% 24

2. Introduction

4UTILS is a small collection of 4DOS *) utilities. I have created
them for my needs and I'm releasing them as freeware.

*) 4DOS is a trademark of JP Software Inc,
PO Box 1470
E. Arlington
MA 02174

I'm a happy (and registered) user of 4DOS and I could not return to plain
COMMAND.COM. In course of time I began to write tools which were aware of
an important 4DOS feature: file descriptions.

These file descriptions are very handy; when I was searching some files
(with `FF' for example) I've often missed them. So I decided to
write a 4DOS aware file finder.

4DESC was written because 4DOS's `describe' is not able of cutting and
pasting. As a (hobby) programmer, I need this feature quite often, since
the executables and the source code often get similar descriptions.
Getting bored of retyping similar descriptions I wrote 4DESC.

4UTILS - A small 4DOS Utility Collection Page 3

3. Getting started

Installing 4UTILS is simple. Do the following:
(In this example I assume you install the 4UTILS package in C:\4UTILS;
please change the directory name if this does not apply.)

i) create a new directory where 4UTILS should reside,
and change into it:


ii) unzip the contents of 4UTILSx.ZIP:


^^^^ ^^^^^^^^ ^
| | |
| | The newest version of 4UTILS, the version
| | number is coded in the last letters,
| | e.g. 4UTILS82.ZIP
| |
| The directory where 4UTILSxy.ZIP resides
UNZIP is the unzipper you are using. You can either use UNZIP
from the InfoZip Group (free) or original PKUNZIP.

iii) Append the directory 4UTILS to your path.

Press and type ';C:\4UTILS'


SET path=%path%;C:\4UTILS

iv) Run DESC.BTM to describe your newly extracted files.

v) Adapt (or create) a suitable 4UTILS.INI file, if needed.
(see section `Customizing')

A sample 4UTILS.INI file has been provided, it's name is
4UTILS.SMP. It contains the default values 4DESC/4FF would
use and a few explanations of the parameters.

4UTILS - A small 4DOS Utility Collection Page 4

4. 4DESC - a simple 4DOS-description editor

4.1 Command line switches and parameters

The Syntax of 4DESC is : 4DESC [/help] [/mono] [/dontask] [d:][\path]

There are three command line switches:

/help jumps directly into the help screen, after a key press you can
start editing.

/mono 4DESC automatically detects on startup whether you are using a
monochrome or a color monitor. This switch is intended to
override this detection (useful on EGA/VGA displays only).

/dontask suppresses the `May I save ?' questions. The descriptions will
always be saved. This feature eases navigation in directory
trees, but may save unwanted changes too.

When supplying a path specification, 4DESC will read the description file
residing in the path you specified.

4.2 Editing and changing descriptions

The following keys have special meanings:

Arrow Keys, PgUp, PgDn, Home, End moves bar resp. cursor

Ctrl-PgUp moves to first line | Ctrl-PgDn moves to last line
Ctrl-Left moves to previous word | Ctrl-Right moves to next word
Ctrl-Home deletes from cursor to | Ctrl-End deletes from cursor to
start of line | end of line
Backspace deletes character | DEL deletes character
before cursor | under cursor
INS toggles from insert mode |
to overwrite mode and |
vice versa. |
Alt-D deletes current |
description entirely |
Alt-C copy current description | Alt-M or move current description
to buffer 2) | Alt-T to buffer 2)
Alt-P pastes the buffer to |
current description |
Alt-S or |
Shift-F10 Shell to (4)DOS |
ESC Exits 4DESC, i.e. saves | Alt-X Exits 4DESC, i.e. saves |
the descriptions and | the descriptions and
returns to the directory | stays in the currently
where it has been started| selected directory.
from. |
4UTILS - A small 4DOS Utility Collection Page 5

Alt-Q Quits 4DESC, i.e. |
discards the changes and |
returns to the original |
directory |
F3 or |
Alt-V View highlighted file | Alt-E Edit highlighted file
F4 or Change into highlighted | F5 or Change into highlighted
ENTER on dir directory. | ENTER on .. directory.
(one level down) | (one level up)
F6 or |
Alt-L Change drive |
Ctrl-N sort directory by name | Ctrl-R Ctrl-N reverse sort by name
Ctrl-E sort directory by extension| Ctrl-R Ctrl-E reverse sort by ext.
Ctrl-S sort directory by size | Ctrl-R Ctrl-S reverse sort by size
Ctrl-D sort directory by date | Ctrl-R Ctrl-D reverse sort by date

Shift+Cursor selects part of text

Shift+INS Paste current selection | Ctrl+INS Copy current selection
Shift+DEL Cut current selection | Ctrl+DEL Delete current selection

1) A "Edit" flag will appear on the bottom right side of the screen
2) " "Buf" " " " " " " " " " " "

Remark: When changing directories/drives the question
"Descriptions have been edited. Shall they be saved (Y/N) ?"
will appear; you need therefore not to worry about your
description's actuality.
(should you regard the questions as annoying, use the /dontask
switch, as described above.)

4UTILS - A small 4DOS Utility Collection Page 6

5. 4FF - a simple file finder

5.1 Command line switches and parameters

Syntax of 4FF is:

4FF [/a:[[+|]-]rash][/z-alz][/s][/b][/d][/n][/p][/?] [dir] {filenames}

This time there is a bunch of command line switches, but they are rather

/a followed by a combination of
r (read only), -r (not read only)
a (archive) , -a (not archived)
s (system) or -s (not system)
h (hidden) -h (not hidden)

searches for files which have these attributes set resp. reset.


. 4ff /a:-r *.exe *.com
searches for executable, writeable files.

. 4ff /a:a *.*
searches for files which have not been backed up yet.

/zx do search in the archive type denoted by the letter x. x my be
one of the following:
- : do not scan archives at all.
a : do scan .ARJ archives only
l : do scan .LZH archives only
z : do scan .ZIP archives

By default 4FF scans .lzh, .zip and .arj archives, using /zx will
will speed 4FF up.

Example: 4FF /z- *.bak

Searching for *.bak files in archives is not very intelligent !

/s scan only subdirectories of given path `start-dir'

4FF will begin scanning the subdirectory you specified in start
dir and will recurse to the deeper levels. This will speed your
search up, if you roughly know where your files reside.

/b bare listing (omits size, date, and descriptions)

This switch is intended for producing "bare" file listing (file
names only) for batch files or piping into other programs.

4UTILS - A small 4DOS Utility Collection Page 7

/d scan all hard disks (floppy drives not included)

Example: 4FF /d *.bak *.swp *.tmp

Locates backup, swap and temporary files, which generally may be
deleted before backing up your hard disk.

Remark: Floppy drives must be addressed explicitly.
Otherwise (if 4FF would scan all drives from A to Z)
you had to insert floppy disks into your drives, even
if you wouldn't be interested in their contents.

/m:nn set right margin to nn.
When printing direct to your line printer, you can set the printer
width by this switch.

Example: 4FF /m:132 *.pas > prn:

[Note: Putting your printer in 132 column mode is your duty!]

/p page output

pages the output, i.e. prints a "-- more --" message and waits for
key to be pressed.

/? shows a small help display.

4UTILS - A small 4DOS Utility Collection Page 8

6. Customizing 4DESC and 4FF - the 4UTILS.INI file

This section is only for people interested in customizing 4FF or 4DESC.
You need not to worry about all the options described below if you "just"
want to use 4DESC/4FF _and_ if you are happy with the country settings
and the colors.
If you are familiar with the SSTOOLS.INI file (as a FRACTINT or PICLAB
user) or if the 4DOS.INI has already been changed by you, you shouldn't
have problems with the 4UTILS.INI file.
A 4UTILS.INI file consists of several sections, enclosed in square
brackets ([ and ]). The case of the keywords is (at least for 4DESC/4FF)
not relevant.

Remark: The following examples have been taken out of 4UTILS.SMP - a
sample 4UTILS.INI file.

In this release a new feature has been introduced (thanks to Jorj Strumolo
for this suggestion):
The 4DOS.INI file will be evaluated too, so you are allowed to place all
this stuff into the 4DOS.INI file too (instead of creating a separate
4UTILS.INI file)
[ but you should use 4DOS version 5.0 or above, the old version does not
(officially) support the presence of "foreign" sections. It may support
it unofficially, but this has not been tested. ]

To be precise, 4DESC reads first the contents of the 4DOS.INI file (first
searched in the directory where 4DOS resides (via COMSPEC) and then in the
root directory of the boot drive, i.e C:\). Afterwards the contents of the
4UTILS.INI file (searched in the directory where 4DESC/4FF has been star-
ted from, in the path or via the 4UTILS-environment variable) will be
appended. The consequence is, that you can put 4DOS-Statements in a
4UTILS.INI file (e.g. ampm, Editmode, CursorIns, CursorOver etc). This
"trick" is handy for 4DOS 4.02 users, who want to set the EditMode

I suggest you one of the following strategies:
0) Live with the defaults.

1) put everything into a 4UTILS.INI file and forget 4DOS.INI.
Put the 4UTILS.INI file in the same directory where 4UTILS resides or
set the 4UTILS environment variable.

If you are working on a (hard)diskless PC or if you are the network
administrator you'll prefer this method. Reason for this strategy:
it is not always easy to locate the "right" 4DOS.INI file in a net-
worked environment, since it is not easy to tell where it resides (The
question is, where 4DOS looked for it settings, there is even the
possibility to put the @4dos.ini-entry into CONFIG.SYS!)

2) On a stand-alone PC running 4DOS 5.0 you can put the settings into the
4DOS.INI file. You may even split the information into a 4DOS.INI-part
and into a 4UTILS.INI part.

3) Recompile 4DESC/4FF with the proper settings (cf Chapter 7)

4UTILS - A small 4DOS Utility Collection Page 9


! The section title has been renamed from [Date & Time Formats]. This was
! necessary to appease the 4DOS parser (Sorry, but you may have to change
! your .INI file)

The following entries are possible:

DateFormat = mmddyy | ddmmyy | yymmdd | ddMMMyy
7.10.92, 10-07-92, 92/10/7, 7Oct92.

DateSep = -

Date separator is a hyphen (mm-dd-yy)

TimeFormat= 12

valid entries are: 12 (am/pm) or 24 (24 hours).
(you can also use 4DOS's am-Flag)

TimeSep = :

Time separator is a colon (hh:mm). Fill in what you like.

MilleSep = '

Fill in what you like for the thousands separator.

NOTE: 4DESC / 4FF detect on startup where you live. (provided that
your COUNTRY= settings in CONFIG.SYS has been properly set.)
The switches above are merely cosmetic.


That is the place where you may change the colors!
The following colors are available (case not significant)

Black , DarkGray
Blue , LightBlue
Green , LightGreen
Cyan , LightCyan
Red , LightRed
Magenta , LightMagenta
Brown , Yellow
LightGray, White

StatusFg = Blue ; Status line foreground color
StatusBg = Cyan ; " " background "
DirFg = LightBlue ; Directories are shown in DirFg on NormBg
SelectFg = Blue ; Select bar foreground color
SelectBg = Cyan ; " " background "
HighFg = LightRed ; Highlighted foreground,
used for "Edit" and "Cut" marks
NormFg = LightGray ; normal foreground color
NormBg = Blue ; " background "
WarnFg = Yellow ; foreground for warning messages.
WarnBg = Cyan ; background " " "

4UTILS - A small 4DOS Utility Collection Page 10


The same for monochrome displays...

StatusFg = Black
StatusBg = LightGray
DirFg = White
SelectFg = Black
SelectBg = LightGray
HighFg = LightGray;
NormFg = LightGray
NormBg = Black
WarnFg = Black
WarnBg = White


Justify= Left | Left.Left | Right.Left

Determines the arrangement of the filenames and their extensions.
Left = xxxxxx.yyy
Left.Left = xxxxxx .yyy
Right.Left= xxxxxx.yyy

! This variable replaces the old LeftJust = Y|N entry.

FullSize = Yes | No | Y | N

Set FullSize=Y to get the `full' size display (x'xxx'xxx [Bytes])
instead of (xxxK).

Viewer = any-viewer-you like

Let Viewer point to your favorite viewer (defaulting to list).

Editor = any-editor-you prefer

The same settings for your favourite editor (default: edit), but I
suggest TPE (Turbo Powers Editor).

Hidden = Yes | No | Y | N

Setting Hidden=Y enables display of hidden files. System files have the
hidden attribute often set, so be sure to turn the Hidden=Yes line, if
you plan to describe system files.

SortCriteria= name | ext | size | date |
rev-name| rev-ext | rev-size | rev-date

Sets the (initial) sort criterion for 4DESC. Defaults to name.

4UTILS - A small 4DOS Utility Collection Page 11



This separator list is used by the Ctrl-Left, Ctrl-Right algorithm.

PasteMovesToNextIndex= Y | N

When pasting a description line, the bar "normally" moves to the next line
(this ist at least the old behaviour). Set PasteMovesToNextIndex=No to
suppress this.


UseMouse = Y | N

Switch the mouse autodetect off. Set UseMouse=N if you have a mouse
connected, but do not want to use it.

VMickeysPerKeyPress = 2
HMickeysPerKeyPress = 2

These 2 parameters control the "jumpiness" of the cursor when using the
mouse. The cursor follows the mouse movements in x- or y-direction when
more than VMickeysPerKeypress in x resp HMickeysPerKeypress in y direction
were made.

NOTE: These two parameters are _hardware-dependent_, strictly speaking
speed dependent. Play around with these values till you get a
smooth scrolling.

The following parameters are originally 4DOS parameters and are typically
found in a 4DOS.INI file. They can nevertheless exist in a 4UTILS.INI file,
but then they count only for 4DESC/4FF. Put them in a blank section or in
a [primary] section.

ampm = y | n
EditMode = Insert | Overstrike
CursorOver = nnn
CursorIns = nnn

Please refer to 4DOS's help for further explanation of the meaning.


These options concern only 4FF.

DoPage = Yes | No | Y | N

Set DoPage = Y if you want to have permanent paging.
(Remark: Redirecting output is still allowed, in this case the paging
parameter will be ignored.)

HilightMore = Yes | No | Y | N

Choose whether to hilights the "-- more --" message (Y) or not (N).
4UTILS - A small 4DOS Utility Collection Page 12

7. (Re)Compiling 4DESC or 4FF

Some hints about (re)compiling 4DESC or 4FF:
(Recompiling 4DESC might be useful if you want to change the default
colors *and* want to save the space a 4UTILS.INI file would occupy.)

. 4DESC and 4FF have been written in Turbo Pascal 7.0
. They use the features Turbo Pascal 7.0 provides, i.e.

* Inline Assembling ( ASM ... END )

If you don't have an inline assembler, recode the parts containing

! * The description handling is done in the DESCRIPT.PAS unit.
! It uses a TSortedCollection to maintain a sorted list of directory
! entries plus their corresponding descriptions.
! This unit is used both from 4DESC and 4FF.
! It would be hard work to throw out the object-oriented part:
! You'd have to rewrite the whole unit.

* 4FF uses the FormatStr-procedures, that implies the following:

4FF uses the Objects and the Drivers-Unit shipped with Turbo Pascal
6.0/7.0 sinces it uses the FormatStr procedure. (FormatStr is hidden
in the Drivers unit, which needs Objects in order to work).

* The TEST286.PAS unit shipped with Turbo Pascal 6.0/7.0 is needed to
detect the processor type. This is used in conjunction with the {$G+}
compiler directive to prevent lock ups on PCs and XTs.

Remove the G+ directive, if you don't have (or find 😉 the
TEST286.PAS unit.

4UTILS - A small 4DOS Utility Collection Page 13

8. Bugs and Comments

Known bugs, comments and deficiencies:

. Non-standard VGA-modes are now supported by 4DESC (Thanks to Robert
Juhasz for his FIX.PAS!)
However, you may encounter problems with your ANSI.SYS driver under DOS.
(I, David, had the usual trouble with the DOS-5.0 ANSI.SYS when running
an 132x60 screen - the driver recognized only 25 rows.)

. Diacritics in filenames are not handled in a logical way: they are not
down-cased. This is necessary for DOS; if they were down-cased (in the
description file) DOS/4DOS would not find the corresponding description
line anymore! This deficiency is not relevant for english-speaking people,
and it should not be relevant for the others too; special characters in
DOS filenames are not a good idea, anyway. (It is not guaranteed how
DOS treats special-characters in filenames, legal DOS filenames consist
of the letters A-Z plus the characters "!#$%&'()-@^_`{}" and "~".
4DOS (and other programs) use "%^@()" and "`" internally, so they should
be avoided.)

. 4DESC does not support file filtering (e.g. `4desc *.pas'). It would be
awkward to implement this. It is not as easy as it looks: Currently I'm
reading the whole directory and the whole description file. Fine.
Masking out some directory entries is easy, but what happens with the
excess descriptions ? On the one hand, they must be read in, or you'll
loose descriptions, on the other hand, they should not be displayed
(the user supplied *.pas, so (s)he doesn't want to see the descriptions
for the *.bak files). To make things more complicated, the indexing -
on the screen - is done directly; if you introduce a visible switch
4DESC would loose its speed.

Since I have implemented sorting, is file filtering IMO superfluous.

. I'm not going to write yet another Norton Commander, so if you really
want to delete or rename files in 4DESC go ahead, but do not forget
to change the description file.

If you find any bugs not listed above drop us a note. Please
describe your system you are working on (which CPU, 4DOS version
specialities etc).

Should you have any comments or suggestions, don't hesitate and send
them to us.

4UTILS - A small 4DOS Utility Collection Page 14

9. How to reach the authors

Our addresses are:

David Frey, & Tom Bowden
Urdorferstrasse 30 1575 Canberra Drive
8952 Schlieren ZH Stone Mountain, GA 30088-3629
Switzerland USA

eMail: eMail:

[email protected] [email protected]
(email address only valid
until spring 1994, as I
am finishing my studies)

10. Acknowledgements

The following people - in alphabetical order - helped to improve 4DESC
resp. 4FF by supplying suggestions, bug reports and hints.

Gateau Alain - Empty Drive bug.
Peter C. Broekhuizen - Arrow right stops after last character.
- Arrow left scrolls as last as possible
- Display of current column
- Cut & Paste via shift-keys.
Miguel Farah F. - ^Home erases from cursor to beginning
of line,
- ^PgUp moves bar to .. instead of .
- Querier mode suppresses save-messages.
- suggested Sorting
Robert Juhasz - contributed his FIX.PAS unit in order
to support theSuper VGA modi.
Tobias Oetikers - inspired me to put this software on the
Jos‚ Jo„o Colen Marques da Silva - suggested Sorting
Jorj Strumolo - ESC escapes into startup directory, while
Alt-X exits into the selected one.
- Overstrike, Block cursor question.
- Additional reading in the 4DOS.INI file
- suggested Sorting
Andreas Tranquillini - beta testing and editing improvements
- Justify options
- UseMouse switch
Frank Zago - Range bug in 4FF,
- directory name parsing

pi - Insert/Overwrite cursor question
- BUG: When a description is empty, pressing
the right key moves one position left.
- .INI file will be read in dynamically, so
it can be as big as 64KB.

...and other people
4UTILS - A small 4DOS Utility Collection Page 15

  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : 4UTILS83.ZIP
Filename : 4UTILS.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: