home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cool Page Magazine 16
/
CoolPage_16.iso
/
tools
/
ffit.doc
< prev
next >
Wrap
Text File
|
1992-12-06
|
18KB
|
427 lines
FFIT ver 1.62, December 1992 by Kai Risku
=========================================
This program was made to help you copy files to disks, without having to
think about how to group the files so they will take up the least number
of disks. This problem is often referred to as the 'The Knapsack
Problem'. FFIT checks the size of the disks you are going to copy to and
then combines the files so they will fill the disks optimally. After
this, the program will copy the files to the disks prompting you for
each disk.
Several options are available to modify the way FFIT works. You can
specify alphabetical sorting, no grouping (sequential copying), wanted
volume size, how much space you want to leave free on the disks, only
use files with archive bit set, test mode (just print the filenames, do
not copy), and much more. 4DOS/NDOS file descriptions are also handled.
Please note that the sorting may take a while, so be patient when using
this program. Also note that since this program copies everything to the
root of the target disks, there is a limit to how many files can be
placed there. As an example can be said that on a 1.44 Mb diskette you
can have 224 files in the root directory. This program will not check
the maximum number of files that may be placed in the root directory.
Therefore you might get an 'Error copying file' if the program tries to
copy too many files to one disk.
Ok, how do I use this wonderful program..
=========================================
Syntax: FFIT [options] [filespecs..] [@listfile] target:
The target drive must be a removable medium. Arguments may appear in any
order. An argument starting with '-' or '/' is interpreted as an option.
The filespec can be one or more directories or filenames with or without
wildcards. You can also put all desired directories or filenames (each
on a separate line) in an ordinary textfile and specify '@filename' as
the filespec.
FFIT is fully compatible with 4DOS/NDOS file descriptions.
When using FFIT all descriptions will be dealt with automagically.
The following options can be used:
-a add
===============
Use the space available on the disk. If this option is NOT
specified, the program will use the whole capacity of the disk, and
thus require totally empty disks (non-empty disks will be erased
after prompting the user for permission).
You MUST use this option if you want to to add files to a disk where
there are already some files! If the -a option is given, the program
cannot say how many disks will be required, as this depends on the
space available. Without this option the program will say how many
disks is needed before the copying begins.
-b sort big files first
================================
If you specify this option all files will be sorted according to
size, biggest first. By using this option, the disks can get a
little bit better filled. If you are fitting to many disks, the
difference between using this option or not, usually means that the
second last disk might not be perfectly filled.
The drawback of using this option is that because all big files are
sorted first, the last disks are filled with lots of small files. Do
not use this option if you want your files evenly spread among the
disks.
-c archive bits
========================
Copy only files with the archive bit set. The archive bit will be
reset after the file has been copied. This could be useful if you
have lots of files but only a limited number of disks and you are
not able to copy all files at once. Set the archive bit on all files
and then use this option. At a later time you can restart FFIT and
copy the files that has not already been copied.
-d n start with disk number n
====================================
This is useful if you have aborted the program and wish to continue
from a given disk. The space between d and the number can be left
out. This option cannot be used together with option -a.
-f force
=================
No prompting for permission will be done. Normally the program will
ask when you are about to erase a disk, overwrite files or if there
are read-only files that are about to be erased, but with this
option given no questions will be asked. Could be dangerous!
-m move
================
After a disk has been successfully copied, the source files will be
deleted. You will be asked to confirm every read-only file unless
option -f is given.
-n no grouping
=======================
The files will be copied in the same order as specified, one at a
time and requesting a new disk when the next file won't fit.
-q quiet
=================
Just a silly little option to generate absolutely quiet beeps.
-s sort alphabetical
=============================
The files will be copied in alphabetical order to the disks.
Normally this will just result in a nicer directory listing, but if
used together with the option -n, all filenames will be globally
sorted.
-t [size] test mode
=====================
Do not write or delete anything, just simulate and print all texts
as they would otherwise appear. This is very useful if you want to
know in advance which files will go on which disks.
You may also specify an optional argument. This argument must then
be one of the following: 160, 180, 320, 360, 720, 120, 144. Normally
FFIT will always examine the target disk to see what capacity it is,
but by using this argument you can set a disksize to use. In this
case you do not need to have a disk in the target drive, which could
come in handy when you just want to test. In this case the target
drive can be omitted from the command line.
-u uppercase
=====================
Print all filenames in UPPERCASE. This has only aesthetical value
and will make very loud filenames.
-v size volume size
=======================
Fit files to the specified volume size. The numeric argument can be
suffixed with 'k' or 'M', meaning kilo (times 1024) or Mega (times
1024*1024). You can also use a decimal point, as in 1.2M which then
means 1.2*1024*1024 bytes.
If the specified size is negative, that much free space will be left
on each disks. The space between v and size can be left out.
Options can be combined, and several options can also be specified after
the same '-' or '/'. The only exception is that no more options can be
combined after a numeric argument. In that case you must start with a
new '-' or '/'.
Example: If you want to give the options add, sort, start with
disk number 3 and test mode, all the following is legal:
-a -s -d3 -t
/astd3
-as -d 3 -t
But you cannot use: -asd3t since you cannot place any
option characters immediately after the '3'.
You can specify as many filenames you wish, and they may contain
wildcards. If you want to copy a whole directory, you can simply
specify the name of the directory. Files that are larger than the
target disk, as well as non-existent files, will be skipped.
Run-time options and what is happening
======================================
When FFIT is started, all given filenames must first be processed. This
involves getting the name, size and eventuelly a 4DOS/NDOS description.
While this is happening, an indicator will indicate (what else should an
indicator do?) that the program is doing some work. Depending on the
number of files and the speed of the computer, this can take some time.
After this is done, you will se how the fitting proceeds. Starting with
disk number one, the program will display a number of bytes which should
be rapidly decreasing. This indicates how many bytes from the target
siz