home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 6
/
Sonderheft_6-96.iso
/
pd
/
disktools
/
kopieren
/
smartcopy
/
smartcopy.doc
< prev
next >
Wrap
Text File
|
1996-11-03
|
26KB
|
643 lines
SmartCopy v1.4a
© 1995 Rask I. Lambertsen
User's Manual
Disclaimer.
¯¯¯¯¯¯¯¯¯¯¯
This program is provided "as is" without warranty of any kind,
either expressed or implied, including, but no limited to, the
implied warranty of fitness for a particular purpose. The entire
risk as to the results, reliability and performance of this
program is assumed by you.
Distribution.
¯¯¯¯¯¯¯¯¯¯¯¯¯
This program is freely distributable. Distribution is allowed if
the following conditions are met:
1. Program and documentation must not be changed in any way,
except for archiving with an archiver, for which the
corresponding unarchiver will work on any CPU type used in
Amigas at the time of distribution.
2. Program, documentation and the icons for the program and the
documentation must be distributed together.
3. The file names of the program, documentation and icons must not
be changed (this especially applies to Fred Fish, who has
had the habit of changing file names to upper case). However;
you ARE allowed to change the default tool of the documentation
icon. You are also allowed to shapshot the icons if you
really need to.
4. Only a nominal and small fee for copying is charged, unless
some sort of media is supplied with SmartCopy, in which case
it is allowed to add the cost of that media to the charge.
5. SmartCopy or parts of it must not be sold in combination with
or as part of commercial software without my written
permission.
Introduction.
¯¯¯¯¯¯¯¯¯¯¯¯¯
SmartCopy was written to easily transfer files from a hard disk
to multiple disks. It automatically finds out when the disk is
full and prompts for another one. This is useful for copying a
bunch of pictures, samples, modules or whatever to disks, like a
picture, sample or module collection. SmartCopy uses a GUI to be
as user-friendly as possible (meaning that you don't need to mess
around with shells/CLIs or directory utilities).
One of my major goals was to make a very fast yet reliable
copy routine (like the one in C:Copy). This became a major goal
especially after I found out that the copy routine in SID2 is not
just slow, but also UNRELIABLE when copying files from CrossDOS
disks with text filtering enabled.
When I released version 1.2, I didn't know of any similar programs
other than CO.COM for IBM PC's and compatibles. It didn't have a GUI,
but, of course, any decent Amiga program has a GUI.
As of this writing, I know of the programs ECopy, Dred, Reducer
and Stow, which (more or less) do the same as SmartCopy. However,
THEY DON'T HAVE A GUI, so if you don't want to have to remember the
format of their command line options, well, then you know which
program to use.
System requirements.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Any Amiga with
- at least Amiga OS 2.0 or later.
- 224 bytes of CHIP memory + 38200 bytes of any type of memory
(measured with C:Avail on my system, may differ on yours).
Although OS 2.0 is supported, the gadgets only show their keyboard
short-cuts on OS 2.04 or later. The keyboard short-cuts still work on
OS 2.0, though.
Amiga OS 2.04 or later is recommended because OS 2.0 contains
an unusually high number of bugs, particularily in the DOS,
which SmartCopy uses a lot.
Amiga OS 2.1 or later is recommended because of the MUCH faster
file requester.
SmartCopy has been successfully tested on my Amiga 500 with 1 Mb of
CHIP memory, 2 Mb of FAST memory, OS 2.1 and a MultiEvolution
harddisk controller with a 540 Mb Quantum Maverick harddisk.
SmartCopy has been successfully tested with MungWall and CodeWatcher.
Installation.
¯¯¯¯¯¯¯¯¯¯¯¯¯
As simple as it can be: Copy the files
SmartCopy
SmartCopy.info
SmartCopy.doc
SmartCopy.doc.info
SmartCopy.guide
SmartCopy.guide.info
to the directory in which you want to install SmartCopy.
From Workbench, just select the the three icons and drag them
to the drawer in which you want to install SmartCopy.
Usage.
¯¯¯¯¯¯
SmartCopy can be started from either Workbench (see the "Tool Types"
section) or Shell/CLI (see the section "CLI arguments"). You
will then see the main window. It contains the following gadgets:
"Add files..." Brings up a file requester so you can add files to
the file list (see below). You can multi-select files
using extented selection. There is also a pattern
gadget, so you can use pattern matching.
If you leave the file gadget empty, then all files that
match the pattern will be added to the file list.
All files added to the list will be selected
automatically.
Keyboard short-cut: "a" or "A".
"Sort files" Will sort the files so that the biggest files are
at the top of the list. This will help SmartCopy
fill the disks better.
Keyboard short-cut: "s" or "S".
"Copy files" Copies the files in the file list (see below) to
the destination device (see below).
Optionally, a directory on the destination device(s)
can be specified (see below).
The comment, attributes and date of the files are copied.
SmartCopy will copy all the files that will fit on the
destination device(s) and will ask for more disks if
all the files didn't fit.
The requester will automatically be acknowledged if you
change a disk.
As files are copied, the list is scrolled so that
the file being copied is in the middle (when
possible). The file which is being copied will
have a '>' to the left of it's name.
The destination device in use will also have a '>' to
the left of its name, so you can see when it is safe to
change disks.
The logo in the lower right corner of the window
will fill up as the disk gets full. It is an
estimate of how much space has been used on the
disk when the file has been copied.
Keyboard short-cut: "c" or "C".
"Move files" Same as "Copy files", except that after the files
have been copied, they will be deleted from the
source directory and removed from the file list.
If the delete fails, the files will just be
deselected.
Also, the file which is being moved will have a '»'
to the left of it's name instead of a '>'.
Similarily, the destination device in use will have
a '»' to the left of its name.
Keyboard short-cut: "m" or "M".
"Remove files" The selected files will be removed from the
file list.
Keyboard short-cut: "r" or "R".
"Clear list..." Puts up a requester asking you to confirm that
you really want to clear the file list (see
below). If you do, click the "Yes" button and
watch the file list be cleared, else click the
"No" button, and the operation will be aborted.
Keyboard short-cut: "t" or "T".
"De"select all Will deselect all files in the file list.
Keyboard short-cut: "d" or "D".
"select all" Will select all files in the file list.
Keyboard short-cut: "l" or "L".
"Delete files..." The selected files will be deleted and removed
from the file list. Files that can't be deleted
will still be in the file list.
You will be asked for confirmation before any
files are deleted.
Keyboard short-cut: "e" or "E".
"Find devices" Scans the system device list for file system
devices. You can use this button if you mount
a device after SmartCopy was started. This
is also handy if SmartCopy couldn't access
the device list on startup.
Warning: Your currently selected device(s) will
NOT be reselected.
Another warning: This seems to use a lot of CPU time.
Keyboard short-cut: "v" or "V".
"List of files to be copied" This is where you can see which
files has not yet been copied.
The scroll bar and scroll arrows
on the right side can be used to
scroll the list when SmartCopy is
not copying/moving the files.
You can click the file names to
select or deselect them. Selected
files have a '·' to the left of them.
"Destination device" This is a list of available disk devices.
You can choose one by clicking on its name
and clicking on a selected device name will
deselect it. Selected devices have a '·' to
the left of them.
SmartCopy will copy/move the files to the selected
devices. You select multiple devices if you want to.
The scroll bar and scroll arrows on the right side
can be used to scroll the list when SmartCopy is
not busy copying/moving files.
"Destination dir" This is where you can enter the name of a
directory on the destination device to
copy the file to. There is a limit of
256 characters for the directory specification.
The directory must exist, it will NOT be created.
This gadget has on-line help (try pressing
the HELP key when it is activated).
NOTE: Changing the destination directory
takes effect on the next file that is copied
or moved, even if SmartCopy is currently busy
copying or moving files.
Keyboard short-cut: "i" or "I".
"Disk space check" Select the way of calculating whether a
file fits on the disk or not.
"Smart (FFS)" is for AmigaDOS FFS disks.
This is a bit inaccurate for disk
formatted with directory caching, though.
"Smart (OFS)" is the same as "Smart (FFS)",
except for OFS disks.
"Smart (PFS)" is for the ProfessionalFileSystem.
"Generic" is for other types of disks.
Use this for CrossDOS/MessyDOS/MS-DOS disks.
"None" turns off disk space check. Useful
if you want to copy something to the RAM disk.
There are some standard window gadgets too. Clicking the close gadget
will quit SmartCopy, and the zoom gadget allows you to reduce the size
of the window, so that it is just big enough for the standard gadgets
and the window title. Finally, there is the depth arrangement gadget
which moves the window to the front if it obscured, and moves it to the
back if it is in the front.
Tool Types.
¯¯¯¯¯¯¯¯¯¯
The following Tool Types can be set in SmartCopy's icon:
PUBSCREEN=<screename>
This will make SmartCopy try to open the main window on the public
screen nameed <screenname>. In addition, requesters related to SmartCopy
will also be opened here, including most DOS requesters.
If not specified, SmartCopy will open on the default public screen.
Example:
PUBSCREEN=CygnusEdScreen1
This will make SmartCopy open the main window on the CygnusEd screen.
In addition, these standard Tool Types are supported by the Workbench:
TOOLPRI=<priority> (-128 to 127)
This will start SmartCopy with the priority of <priority>.
The highest priority tasks are given CPU time first. Tasks on equal
priority share the CPU time they are given.
If not specified, SmartCopy will be started with priority 0. This should
be acceptable in most cases.
Example:
TOOLPRI=1
This will cause SmartCopy to be started with priority 1, thus giving
SmartCopy CPU time before most other programs, which are started at
priority 0.
DONOTWAIT
This is for use if SmartCopy is put in the WBStartup drawer. If
Workbench finds this Tool Type, it will not wait for SmartCopy to
finish. So if you place SmartCopy in the WBStartup drawer, you should
specify this Tool Type, as SmartCopy does not automatically exit.
STARTPRI=<priority> (-128 to 127)
This is for use if SmartCopy is put in the WBStartup drawer. This Tool
Type decides in which order programs in the WBStartup drawer are
started. The program with the highest priority is started first.
If not specified, priority 0 is assumed, which should be fine.
WAIT=<seconds>
This is for use if SmartCopy is put in the WBStartup drawer. It
specifies how long Workbench should wait before starting the next
program in the WBStartup drawer.
Mostly, this tooltype is only really useful to avoid disk trashing
when several program access a disk at the same time.
CLI arguments.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Only one keyword can be specified:
PUBSCREEN/K:
This works just like the Tool Type of the same name.
Example:
6. HD1:> SmartCopy PUBSCREEN CygnusEdScreen1
This will cause SmartCopy to open on the CygnusEd screen.
Acknowledgements.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
I wish to thank
- All the people who created the GNU C compiler.
- Matthew Dillon for DMake and makeproto (from the DICE C compiler).
- Frank Wille for his excellent linker PhxLnk. Incredibly, this
linker made SmartCopy 888 bytes shorter compared to Dlink!
- Piotr Obminski for SKEW (SKEleton Writer).
- Commodore-Amiga for MungWall.
- Michael Plitkins for CodeWatcher.
- Joe Yurick for ideas and suggestions.
- Jussi Lind for ideas, suggestions and a bug report.
- Holger Kruse for the right code to calculate the number of
blocks a file will occupy (FFS/OFS).
- Michiel Pelt for helping me support his excellent PFS.
- Paul van der Heu for converting the docs to AmigaGuide format.
Know bugs/quirks/problems.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
SmartCopy will happily let you put the same file in the file list
multiple times which it shouldn't, since the file may be deleted
if the file is moved. I may not fix this, since it is generally not
a problem. And fixing it could slow things down too much. I might add
an option so that the user can choose to have it fixed or not.
Multiple destinations may not work optimally yet. The problem is that
I don't have more than one drive with removable media, so I have a
hard time testing this part of SmartCopy.
SmartCopy has some problems with hard links. They always end up at
the buttom of the file list after sorting. I hope to fix it soon.
When the new automatic directory scanning feature is used, a lock
is left on the scanned directory. This is a bug in asl.library that
shows up when multiselect is enabled and the user click OK without
choosing a file.
This bug exists in asl.library v38 (from the WB 2.1 disks). It may
exist in older versions as well.
There seems to be a bug in the OFS/FFS file systems. Sometimes
you may get a "Volume fubar is full" requester, but if you take the
disk out of the drive and the insert it again (the same disk), then
the file system suddenly finds that there is enough room on the disk.
This has happened to me using the OS 2.1 FFS, and according to the
documentation for Reducer (by Christian Stieber), this file system
bug exists upto and including OS 3.1.
I can't do anything to work around this problem, if it happens
to you, just eject the disk and insert it again and see if it
works. If it doesn't, you should contact me (see "The author" for
details).
If SPEAK: is mounted, SmartCopy will lose 128 bytes of memory
(two blocks of 64 bytes) on startup and every time you click the
"Find devices" button. This seems to be a problem with the
L:Speak-Handler (at least on my Workbench 2.1 system).
5. HD1:> Version L:Speak-Handler FULL
speak-handler 37.4 (21.2.91)
Doing a
5. HD1:> List SPEAK:
will lose you 256 bytes (4 blocks of 64 bytes). Doing a
5. HD1:> Dir SPEAK:
will lose you 128 bytes (2 blocks of 64 bytes). The big problem is
that this causes memory fragmentation.
This problem can worked around by not having SPEAK: mounted.
Although this is not a bug in SmartCopy, I mention this because
it is likely that people will have SPEAK: mounted as part of their
system startup, like having the "SPEAK" icon in DEVS:DOSDrivers for
Workbench 2.1 and above.
(The above results were obtain with CodeWatcher (see acknowledgements)
and verified with C:Avail.)
Things I would like to add.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Besides making SmartCopy as fast and small as possible, here is a few
things that I would like to add (highest priority first):
- a way to abort copying files.
- a better sorting algoritm. The current one has a worst case
complexity of O(n²), which is not good. This means that if you
double the number of files in the list, it takes four times as
long to sort it. This could be improved to O(n·log(n)).
NOTE: I made a test in which I sorted a list of 2132 files (no special
order). That took 13.0 seconds. Then I resorted that list. Then it
took only 1.1 second. If I had used a better sorting algorithm, it would
have taken only little longer that 1.1 second to sort the unsorted list.
So this is important.
- a smarter move function. If a file is being moved to the same device
as it came from, SmartCopy should use the Rename() call instead of
copying the file and deleting it afterwards.
- support for the BFFS (Berkeley Fast File System).
- provide more progress information and/or estimate the number of
volumes required.
- disable gadgets when they are not functional.
The author.
¯¯¯¯¯¯¯¯¯¯¯
I can be contacted via
- Regular mail:
Rask I. Lambertsen
Pinievej 20
Strøby Egede
DK-4600 Køge
Denmark
(To type 'ø' on non-Danish keyboards, press Alt and 'o' at the same time.
If it doesn't work, just use 'oe' instead.)
- Phone:
(+45) 56267951
^
************************************************
* *
* THE PHONE NUMBER IN THE 1.3 DOCS WAS WRONG! *
* *
************************************************
- E-mail:
Rask I. Lambertsen <gc948374@gbar.dtu.dk> (preferred)
or
Rask I. Lambertsen <e9864029@ebar.dtu.dk> (expires around June)
Bug reports, suggestions, ideas, etc are EXTREMELY welcome.
I would also like somebody to test SmartCopy with Enforcer.
Fast algoritms for sorting a list (not an array) are also welcome.
I would like to know which sort of configurations SmartCopy is used
on and how it performs on those configurations.
I would like to know if this program is useful to somebody.
If you think I deserve it, I will accept donations, but you are NOT
required to send me donations, and you should NOT feel guilty if
you don't. This IS FreeWare.
History.
¯¯¯¯¯¯¯¯
1.0 (Sometime at the end of 1992)
Simple GUI file copier with simple disk space check.
Not released to the public.
Size: 5552 bytes.
1.1 (11-Aug-93)
Improved disk space check with options for specialized
calculation of disk space on FFS and OFS. Generic is the old
space check. Also, disk space check can now be turned off.
Rearranged GUI to get more space.
Increased window size.
File comments and attributes (protection bits) are
preserved when the files are copied.
Changed the gadget labels to be User Interface Style Guide
compliant.
Added (permanently disabled) "Sort" gadget.
Added the little logo in the lower right corner.
Added the option to copy to a directory on the destination.
SmartCopy will now close and reopen it's window when it
thinks the user has changes screen resolution. This is to
help IPrefs close and reopen the Workbench screen.
Fixed a lot of bugs, including these major ones:
The device list is now locked and stepped through using OS
functions, making it safe.
No longer enters an endless loop when copying empty files.
No longer enters an endless loop when there is less than
one (1) byte of free memory.
Not released to the public.
Size increased from 5kb to 13b :-(
Size: 13795 bytes.
1.2 (27-Nov-94)
Fixed disk space check for FFS/OFS disk (the improvements in v1.1
were barely noticeable because I made a stupid mistake). This time
it REALLY should work.
FFS and OFS space check is now the same, the old code was almost
identical for the two cases anyway.
FFS/OFS disk space check should also work with block sizes other
that 512 bytes now.
Fixed the file copy routine so that it can copy from CrossDOS
devices with text filtering enabled.
File dates are copied too now.
No longer requires utility.library version 37, version 36 will
do (a stupid error of mine).
Removed the useless (and permanently disabled) "Sort" button.
No longer forces the ASL file requester to use any particular
text for the title and the "OK" button. This looks A LOT better
when the system is localized to another language than English.
The code to close and reopen SmartCopy's window has been
removed as it didn't work as intended. Instead of
reacting to changes to the screen, it reacted to changes
in printer settings. Unfortunately, when the window
reopened, SmartCopy crashed. Even starting a certain word
processor would make SmartCopy react and crash! :-(
Reduced size from 13 kb to 10 kb :-)
Size: 10624 bytes.
1.3 (26 Jan 95)
No bugs were fixed because none were found :-)
Sort-by-size function added (yes, finally it's there).
Files can be marked to process only those files.
Multiple destination devices can be selected.
You can now either move or copy the files.
Delete-files function added.
Rearranged GUI to get room for the new gadgets.
The device list will probably show more devices than
before (like RAM:, for example).
Better way of checking if a file fits on an FFS/OFS device.
Back to seperate FFS and OFS space check calculation.
Sizes of each version added to the program history.
Size: 12672 bytes.
1.4 (31 Mar 95)
Bug fix: No longer unlocks the public screen twice.
Bug fix: No longer closes the window if it couldn't be opened.
(Why don't people tell me these things???????)
Added support for ProfessionalFileSystem.
Changed Generic disk space check so that it works better with
disks formatted with CrossDOS.
If, in the file requester, a directory is selected, but no
files are selected, all files that match the pattern are added
to the file list automatically.
Much faster sorting, even faster resorting.
Less memory fragmentation, generally improved speed.
The logo (hopefully) doesn't flicker as much any more.
Some other cosmetic changes.
Size: 13008 bytes.
1.4a (23 Apr 95)
Bug fix: The public screen is now correctly unlocked even if
the window open successfully. In v1.4, I thought I was fixing a
v1.3 bug, but it turned out there was no bug after all, and v1.3
did NOT unlock the public screen twice as I thought it did.
(Now I know why people didn't report this non-existant v1.3 bug.)
Size: 12080 bytes.
Here is a graph of the sizes as a function of the version number.
kb
^
|
14 +
| * *
12 + * * * *
| * * * *
10 + * * * * *
| * * * * *
8 + * * * * *
| * * * * *
6 + * * * * *
| * * * * * *
4 + * * * * * *
| * * * * * *
2 + * * * * * *
| * * * * * *
+--+----+----+----+----+----+--->
1.0 1.1 1.2 1.3 1.4 1.4a version