Dec 102017
A utility to 'defragment' an HPFS partition. Source included.
File HPFS-CMP.ZIP from The Programmer’s Corner in
Category OS/2 Files
A utility to ‘defragment’ an HPFS partition. Source included.
File Name File Size Zip Size Zip Type
COMPRESS.DOC 1785 929 deflated
COMPRESS.EXE 5749 3409 deflated
COMPRESS.MOD 3394 1038 deflated
COMPRESS.PRJ 118 106 deflated

Download File HPFS-CMP.ZIP Here

Contents of the COMPRESS.DOC file


This program defragment files on a HPFS partition using OS/2. It is
tested with OS/2 1.3, but should work OK with OS/2 1.2 too. How the
algorithm works, is easy to see in the included source. I think this
approach will work, but as I don't have any specific information on
the DosCopy API, and if this API sets the pre-allocation file size
according to the file allocation information.

My personal opinion is that it is somewhat unnecessary to defragment
a HPFS partition, but I have seen users requesting this kind of program.

The program is started with the following syntax:

Compress [/S]

File path of files to be compressed. The parameter should be
entered like "\" or "C:\DEMO\".

/S Optional. Specifies that subdirectories should be compressed

You should NOT stop the program with Ctrl-Break, or similar. If you
want to terminate, you should press . IF you press Ctrl-Break,
you MAY "almost" lose ONE file. If you press Ctrl-Break, you should
look for a file called "Mikaels.$$$", in the last compressed directory.
If this file exists, you should rename it back to the last file name
written on the screen. This happens only if you was unlucky enough to
press Ctrl-Break exactly between the DosDelete and DosMove API calls,
but we all know Murphys law.

As I don't have noticed any speed improvements myself, using this
program (my drive is in good order already), I would be happy if
you would like to post me your experiences. If you have any questions
or suggestions, please mail me.

My address:
Mikael Wahlgren
Kransen 4E
S-416 72 Gothenburg

Fidonet: Mikael Wahlgren 2:203/302.5
Internet: [email protected]

 December 10, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>