   =====================================================================

                    Fill V2.0  ---  Storage Optimizer
                   Copyright © 1994-95 Torbjörn Hultén

    Short: Selects files for copying/moving so that the destination
           is filled to it's capacity. Uses a smart algorithm that
           checks all combinations for optimal total size, and with
           priority to bigger files. Supports wildcards.

    If you intend to use this product, please read the ENTIRE doc!!!

   =====================================================================



USAGE
~~~~~
   Fill <source> <destination> [<options>]

   Wildcards supported for source.

   Options:

     CLONE           Keeps the original filedate and protection bits.

     LEAVE <number>  Leaves given number of blocks untouched on destination.
                     Default is 1(setting it to zero will probably result is the
                     disk full errormessage). Included for untested filesystems.

     MOVE            Deletes files from source after copying.

     MULTI           Repeated copying. Will ask for diskchange.

     NOCOMMENT       Doesn't copy filecomments.

     NOCOPY          Displays selected files without copying them.

     PC              For PC formatted disks (no header/extension blocks).

     QUIET           Only outputs information for requests, or if unsuccessfull.
                     Intended for scripts.


INSTALLATION
~~~~~~~~~~~~
   Place Fill at desired location, preferably somewhere in your path.


REQUIREMENTS
~~~~~~~~~~~~
 · An Amiga with kickstart 36(2.0) and over.

 · The optimization algorithm has a rather high memory demand (at least with a
   large number of files and/or lots of free space on destination). It should
   not be of any problem if used in a common way, e.g. with standard disks and
   about 50 files to copy it uses about 200kb (If you runs out of memory I
   suggest that you use Barry Will's Fill, read more below).

 · The maximum free space on destination has been set to 16MB(on FFS). If there
   is more free space left, why use this program anyway?


WHY SPEND HOURS TO MAKE A PROGRAM LIKE THIS ONE?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Apart from beeing a great C programming practice, I needed such a program.
   I ran across a Fill program that worked ok, but it uses a rather primitive
   algorithm for selecting the files. It simply selected the biggest file that
   would fit for the moment. Since this wasn't enough I started to design an
   algorithm that would use combinations of smaller files as well. This
   algorithm calculates the OPTIMAL solution, and it selects as big files as
   possible. (message to Barry Will: it IS feasible :) ) The two drawbacks are
   that it takes somewhat longer to calculate (worth waiting for) and that it
   uses rather much memory. If you runs out of memory I suggest that you use
   Barry Will's version. It could be found on Aminet: disk/misc/fill-v1_2a.lha,
   or on DMz BBS at +46-(0)8-654 9950/6118/9962. Happy copying!


LEGAL STUFF
~~~~~~~~~~~
   This product is Giftware, and may be freely distributed and/or used under the
   following restrictions:

§1 Modifications of this product must not be distributed.
§2 This product may not be distributed for profit. The cost should not exeed
   that of the cost of materials and shipping. Distribution of this product in
   a commercial package, without written permission from the author,is
   forbidden.
§3 Since this product is Giftware, you REALLY should consider donating some
   money to any needing, e.g. the Red Cross, Fred Fish or ME :)

   This product is provided AS IS. The user takes full responsibility for any
   eventual damage resulting from the (mis)use of this product.


DEVELOPMENT
~~~~~~~~~~~
   This product was developed using C on a Commodore Amiga 3000 with:

     Kickstart V40, WorkBench V3.1
     2Mb Chip, 4Mb Fast RAM, 52+209 Mb HD
     1760K floppy drive, OFS, FFS and the CrossDos(tm) PC format

   Also tested ...

     ... on an Amiga 1200 HD

     ... on an Amiga 2000 1+2Mb RAM with OS 2.1

     ... on an Amiga 2000 1+6Mb RAM with OS 2.1

     ... with DiskSpareDevice V1.6 ©Klaus Deppisch (up to 1.92Mb/disk)

   Thanks to Göran Orsander for beta testing and improvement suggestions.


THINGS LEFT TO DO
~~~~~~~~~~~~~~~~~
   Well, this is up to YOU. If there is any function you're missing, contact me
   on any of the addresses below. Looking forward to loosing some extra hours of
   sleep :)


HISTORY
~~~~~~~
   v0.2b - Not released, 10 November 1994
    · Optimization works, but doesn't copy.

   v0.3b - Not released, 14 November 1994
    · Now it actually copies the files (with comment, but without flags/date).
    · Added the MOVE flag.
    · Added the QUIET flag.
    · Entering the current directory ("") will not cause error. Hmm!

   v1.0 - Released locally, 16 November 1994
    · Added Ctrl-C handling (releases memory).
    · Fixed a minor cosmetic bug.

   This version included all I needed, but I soon realized that the public would
   want more. The story continues ...

   v1.1b - Not released, 19 November 1994
    · Bug fix. The destination file wasn't deleted if error in copying.
    · Added the LEAVE option.
    · Added the NOCOPY option.
    · Now checks if maximum free space have been exeeded.

   v1.2b - Not released, 27 November 1994
    · Added the PC option.
    · Automatic Amiga filesystem recognition.

   v1.3b - Not released, 5 December 1994
    · Added the MULTI option.
    · Massive changes in code structure.

   Merry x-mas and a happy new year!

   v1.4b - Not released, 24 January 1995
    · Added q and l options at diskchange.
    · Added lots of statistics.
    · Cosmetic bugs fixed.

   v2.0 - Released, 11 Mars 1995
    · Now supports fileselection with wildcards.
    · Added the CLONE option.
    · Added the NOCOMMENT option.
    · Checks for enough stack and kickstart version.
    · Bug fix. Didn't update the filelist ok when using MULTI.



CONTACTING THE AUTHOR
~~~~~~~~~~~~~~~~~~~~~

   Internet:   thudv93@hermes.hv.se

   Snailmail:  Torbjörn Hultén
               Lyan 62.108
               352 52  Växjö
               SWEDEN
               
   Telephone:  +46-(0)470-51670

   Don't hesitate in using any of these addresses. I'd like to get any
   fan mail, or more likely, suggestions and/or bug reports.
