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

                    Fill V1.0.  Smart Multi-file Mover.
             Copyright ©1993 Barry Wills.  All rights reserved.


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


DISTRIBUTION.
~~~~~~~~~~~~
This product may be freely distributed under the following restrictions:

1.  The complete contents of the original archive must remain intact.
2.  The original material may in no way be modified.  (See P.S. at the end
    of this document for extenuation of this term.)
3.  This product may not be distributed for profit.  A nominal copying fee
    is authorized (for cost of materials and shipping and handling
    comparable to that charged by Fred Fish.)
4.  Commercial distribution of this product without written permission from
    the author is forbidden.



USE OF THIS PRODUCT.
~~~~~~~~~~~~~~~~~~~
This product may be used under the following restrictions:

1.  Non-commercial use of this product is free of charge.
2.  Commercial use of this product without written permission from the
    author is forbidden.  This includes shareware.
3.  Honorable mention of the author and product must be included in the
    client documentation.
4.  This product may not be used for malicious intent.



DISCLAIMER.
~~~~~~~~~~
This product is provided without any warranty, express or implied.  The user
of this product assumes full responsibility for any damage resulting from
the use and/or misuse of this product.


CONTENTS.
~~~~~~~~
This archive should contain the following files:

  Fishcon.txt   - Short description.
  bin/cf        - Executable, creates a file of any given size.
  bin/Fill      - Executable, V1.0.
  docs/Fill.doc - Copyright notice and product information (this file).
  source/cf.e   - Dummy-file creation utility source.
  source/Fill.e - Fill program source.
  pmodules/     - Directory containing the following EPP source modules:
    commandLineArgs.e
    skipNonWhite.e
    skipWhite.e
    upperChar.e


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


REQUIREMENTS.
~~~~~~~~~~~~
· An Amiga with the minimum configuration.  Should operate under KickStart
  V1.3 or higher.

· Requires arp.library V39+.

· You will need EPP (an E Preprocessor), Wouter van Oortmerssen's Amiga E
  and at least 1Meg of RAM if you want to compile the sources.



WHAT IS IT?
~~~~~~~~~~
This is no longer a Beta version.  Bug reports are still requested.  FILL
copies or moves all files from the directory specified on the command-line
to a destination (normally a floppy drive) in such a fashion as to waste as
little storage as possible on the destination.  Fill supports wildcard
pattern matching of filenames.



WHY IS IT?
~~~~~~~~~
I was suitably impressed by a program I saw (can you believe it?) on
IBM/clone machines called FILL.  I hunted for an equivalent (or the source
so I could port it) for Amiga but it was unavailable.  So I wrote it.

This was not just an exercise.  I need this program.  I often download a lot
of files to my hard drive and then peruse through them and classify them
later.  But sometimes I can't get to them until MUCH later (school gets in
the way, etc.)  In the meantime if I need space on my drive then I have to
manually copy these files to floppy for temporary storage.

Both time and floppy diskettes are at a premium.  Manually copying takes a
lot of time, and diskettes aren't a dime a dozen ($6 - $10 a dozen,
actually.)  That's where FILL comes to the rescue.



USAGE.
~~~~~
1.  Typing FILL without any parameters (or with invalid parameters) will
produce the following message:

   Usage:  Fill [<options>] <source> <dest>
     <source>  Any valid DOS "dev:dir", ARP wildcards supported
     <dest>    Any valid DOS "dev:dir"
     [<options>]
      -b##  Buffer size in kbytes (1-100; default 20)
      -c    Copy files only, don't delete source (default MOVE FILES)
      -e##  Error margin, add blocks to storage estimate (1-20; default 0)

3.  Typing "Fill . DF0:" will MOVE all files in the current directory to the
floppy in DF0:.  The source directory may be any valid DOS file specification
(i.e., any [dev:][path/]filepattern.)  Arp wildcards are supported, so if you
type "Fill temp/*.lzh DF0:" than all files in the temp directory that have a
".lzh" extension will be moved to the floppy in DF0:.

4. All files moved or copied retain their protection bits.  If the diskette
in DF0: becomes full the number of unused bytes is displayed for your
edification and you will be prompted to insert the next diskette.  Entering
"Q" or "q" at the prompt will abort the program.  Typing Ctrl-C at any time
will abort the copy/move and remove from destination the file being copied
at the time of interrupt.

5.  Buffer size is 20k by default.  Allowable range is 1k-100k.  Using a
buffer size of 20 on my machine seemed to work well enough.  I've noticed
that if you use a buffer that will accommodate half your files you'll get
the best throughput.  Using 100k for tiny files does not improve the speed.

6.  Program mode is MOVE by default.  The option '-c' disables deletion of
files from the source medium.  If an error occurs while writing to
destination, the destination file is removed (but the source file is not), a
message is displayed and a smaller file will be attempted.  (I could not
test this feature because I couldn't get FILL to fail.  I would like to be
notified if this occurs!)

7.  Error margin is 0 blocks by default.  This option was supplied in the
event that storage requirements are incorrectly calculated by the program.
This should only occur when attempting to FILL a floppy that isn't empty; in
this case fragmentation may occur on an uneven file extension boundary,
causing an extra file extension block to be required.  I don't yet know how
to predict this, so we're stuck using the option until then.  (I would
greatly appreciate it if someone suggested a source of information.)



OTHER CONSIDERATIONS.
~~~~~~~~~~~~~~~~~~~~
FILL does not check for files on destination that have the same name, they
are simply over-written.  For this reason, and the probability of file
fragmentation, using partially-full disks with this program is discouraged.

The storage requirements formula used in this program is not sanctioned (as
far as I am aware) by anyone but me.  I formulated it by experimentation
with DOS.  Therefore, it is possible that the calculations may occasionally
be inaccurate.  If this occurs I would appreciate a bug report and as much
information about the circumstances as possible.  Redirecting the output of
the DOS List command to a text file(s) would be very helpful, as would error
messages generated by DOS and the program.

Since FILL was written with 880k OFS floppies in mind as the standard
destination device, the storage requirements calculation may be inaccurate
if you are trying to fill hard/floptical drives or high density drives.  I
have no need (and no means) to test other media types at this time.  If this
causes you severe heartburn please let me know and I'll consider researching
it.  I intentionally did not play with FFS since I don't use it on my
floppies.  FILL may act a little flakey if used with FFS floppies.  I don't
know for sure.


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


LIMITATIONS.
~~~~~~~~~~~
  · Doesn't do subdirectories.

  · Empty floppies work best.  Floppies that have stuff on them already may
    cause fragmentation on uneven file extension boundaries.  This causes
    innacurate calculation of destination storage requirements.  This is
    the reason for the Error Margin option.  I don't have a rule of thumb
    for the use of this option; it's up to you.

  · If the destination becomes full during a file transfer the destination
    file is deleted and a smaller file is attempted (but the source is not
    deleted.)  This should only happen when using a disk that is not empty
    to start with.  If this occurs use the Error Margin option.  If it
    happens while you are using empty floppies, it's a miscalculation and
    should be reported as a bug.

  · Any other features not included that you think would be worthwhile...



CAVEATS.
~~~~~~~

  · I've repeated this caution about using blank disks with FILL.  Let me
    qualify this by saying that FILL should work properly on disks that have
    been copied to, but not deleted from and recopied-redeleted, or any
    combination thereof, since deleting and rewriting leave "holes" in
    disks.  FILL should also work on optimized disks.



TO DO.
~~~~~
  · Optimized copying.  Comparing combined size of two or three smaller
    files instead of just using the largest file that will fit.  (Not sure
    this is feasible.)

  · Allow specification of an alternate destination drive (for those of us
    with more than one floppy.)



HISTORY.
~~~~~~~
   V0.10b - First release, May 1993.
   ~~~~~~
   1.  Locks destination.  Doesn't care if it's a floppy.
   2.  Locks source.  Source is always current directory.
   3.  Examines contents of source directory, stores filenames and sizes in
       a list in descending order.
   4.  Checks free space on destination.  Gets from list largest file that
       will fit on destination.  Moves file to destination.  Continues
       until list is emptied or files remaining in list won't fit on an
       empty volume.
   5.  Prompts for disk-change when volume becomes full.  Allows user
       interruption.
   6.  Displays number of unused bytes on a finished volume.
   7.  Supports options:
       -b##  Copy buffer size (1-100k; default 20)
       -c    Copy only.  Don't move files. (default MOVE FILES)
       -e##  Error Margin for storage estimate (1-20 blocks; default 0)
   8.  Preserves file attributes.
   9.  Recovers from full disk error (untested.)

   V0.11b - Released (oops, I don't remember).
   ~~~~~~
   1.  Corrected erroneous check for file too big to fit on empty volume.
       V0.10b would keep asking for another disk, even though a file would
       not fit on an empty volume.  User had to enter 'Q' or 'q' to quit at
       the prompt.
   2.  Corrected to get the destination infodata before displaying free
       space when exiting the program.  Previously, the free space shown
       upon exiting was the free space on the destination BEFORE the last
       file was copied/moved.  (oops)

   V0.12b - Released 22 May 93.
   ~~~~~~
   1.  Added Ctrl-C interrupt capability.

   V1.0 - Released 13 Jun 93.
   ~~~~
   1.  Removed from beta status.
   2.  New command-line argument for source dev:directory.
   3.  Now using arp.library to select filenames by pattern.


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


MISCELLANEOUS.
~~~~~~~~~~~~~
This product was developed and tested on a Commodore Amiga 500 with the
following configuration:

   KickStart V1.3, WorkBench V1.3, ©Commodore-Amiga, Inc.
   Amiga E V2.1, ©Wouter van Oortmerssen
   AZ V1.50, ©Jean-Michel Forgeas
   ARP V1.3, Amiga Resource Project, ©ARP Authors.

   DataFlyer 500 SCSI controller
   Quantum 52M HD
   Dual 880K floppy drive
   1M 16-bit Chip RAM
   CSA Derringer 030 accellerator:
      68030 CPU @25MHz
      68881 FPU @27MHz
      4M 32-bit Fast RAM


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


CREDITS.
~~~~~~~
Special thanks go to:

  · Wouter van Oortmerssen for making Amiga E awesome and available!

  · Jean-Michel Forgeas and The Software Winery for producing such an
    outstanding text editor (nice docs, too!)

  · Arp Authors, those Amiga monoliths, most (all?) of whom are still
    around!

Thanks!  You guys are awesome!

  · Thanks goes also to those who helped me test this thing:
    Kenny Odle.

"But," you say, recalling my words, "if time is at such a premium, then why
spend a week writing a program that may not save you that time in return?"
Well, it's because I eat bytes and I shit bits, so I gotta write SOMETHING.
I WANT a program that does what FILL does; I don't particularly feel an urge
to author a spreadsheet.  Would an artist paint buffalo if he wanted to
paint naked women?  Besides potential fame and glory (hah-hah-haaaaah!) and
the drive to make an unruly beast bow to my wim (hah-hah-haaaaah,
HAH-HAH-HAAAAAAH!), it's because of programmers like the guys I just
mentioned that I need a program like this.  If you LIKE to send money, then
don't let me discourage you.  Otherwise, you may use FILL under the
conditions described above with a clear conscience.


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


CONTACTING THE AUTHOR.
~~~~~~~~~~~~~~~~~~~~~
I can be reached by the following means:

  Internet:  bwills@kirk.safb.af.mil

  USnail:    Barry Wills
             5528D Pryor Dr.
             Scott AFB, IL 62225 (USA)
             (618)-744-1096

I wrote this for my own use, but I hope you get as much use out of it as I
do.  Send mail, money, software, warm weather to the address(es) above.  I
am very interested in feedback; I will answer all mail.  Good luck and
enjoy!

P.S. - Distributers and users of this program are hereby granted the right
to replace the letters of the singly occurring expletive "shit" (now doubly
occurring) with asterisks (*), character for character, if it so offends
them.  This is the only permitted change to the package contents.  A package
so changed MAY BE DISTRIBUTED IN THAT MODIFIED FORM (although there are some
out there who would feel cheated if they couldn't figure out just what that
darn word was before somone axed it!)  This amendment is intended for the
convenience of G-rated BBSs.  (Those who get this package in its censored
form may contact me and I will reveal to them the original word so they can
change it back.)



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