AmigaOS 4.0 - About OS4 - Commands
BENCHTRASH creates a global "Trashcan" icon on the workbench screen. Icons dropped over it will be either deleted on request, or are moved to the "Trashcan" drawer on the disk they are located on. In addition, BenchTrash tries to eject a disk if its icon is dropped over it.
NAME <name> specifies the title of the icon to appear under the trashcan. Defaults to "BenchTrash".
ICON <path> specifies the path of the icon, without ".info", to use on the workbench screen. Defaults to the standard trashcan icon.
FULLICON <path> specifies the path to an icon, without ".info", for a "full" trashcan.
If given and BENCHTRASH detects a full trashcan, it displays this icon alternately with the icon specified by the
ICON option for an empty trashcan (or default). BENCHTRASH checks the state of the
trashcan(s) every time it gets activated, i.e. either when an icon gets dropped into it, or when you double-click on it.
NEWTRASHICON <path> specifies the path to an icon, without ".info", to be used if BENCHTRASH has to create a new Trashcan drawer. Defaults to the standard trashcan icon.
ICONX <coordinate> specifies the horizontal position where the BenchTrash icon should be placed. By default, this will be on the left side of your Workbench screen.
ICONY <coordinate> specifies the vertical position where the BenchTrash icon should be placed. By default, this will be the bottom of your Workbench screen.
MODE <mode> specifies what to do with icons dropped on top of the BenchTrash.
CLEANUP ON specifies that BENCHTRASH must look into the global trashcan drawer on startup and will delete files that are older than a certain amount of days. THIS WORKS ONLY for the drawer that was specified as global "trashdump", not for the trashcan directories of individual volumes. The default is OFF, in which case you can use the workbench menu to empty the trashcan.
COPYFIRST controls the way that BenchTrash copies files to the global trashcan. If COPYFIRST ON is specified, the complete set of data is copied first, and then, in a second step, the data is erased from its original place. This is safest because no data loss can occure, but your HD must be big enough to store the complete set of files AT LEAST TWICE. It might also defragmentate your HD somewhat, but an unexpected failure while copying the files won't affect the data because the original is still kept. The default is COPYFIRST OFF, which means that the copied files will be deleted immediately, hence leaving more space on the HD. While this is quicker and needs less storage, it is also less safe because an error condition while deleting the files will end in one piece of the data in the trashcan and the not yet copied part at the original place. It is then up to you to restore the original data sets. Remember, this setting makes only sense if GLOBAL is set to TRUE as well.
If CLEANUP ON has been specified, CLEANUPDELAY <seconds> specifies the delay in seconds between launching BenchTrash and cleaning the global trashcan. Defaults is 10 seconds. The cleanup task runs at priority -1, so tries to stay friendly in the background. It requires an exclusive access to the trashcan directory, so you can avoid or delay the deletion process simply by opening the trashcan drawer. BENCHTRASH will then come back every minute to check whether it is now able to clean up this directory.
If CLEANUP ON has been specified, MAXAGE <days> specifies the maximum age in days of the files to be kept in the global trashcan directory. Files older than MAXAGE are erased as part of the startup process of BENCHTRASH, and only done ONCE each time you boot the computer. Default is 7 days.
CENTER ON specifies that BENCHTRASH will center its setup window on the Workbench screen. Default is CENTER OFF, placing it in the upper left corner.
PROGRESSBAR ON specifies that BENCHTRASH should display a progress bar about how far it has got with deleting files. An "Abort" button is present, too, to cancel the process. Closing the window with the status bar aborts the deletion also. Default is PROGRESSBAR OFF.
DONOTASK ON specifies that the "confirmation" requester is to be suppressed and the files are always deleted. THIS MIGHT BE QUITE DANGEROUS!. Default is DONOTASK OFF which shows a requester.
If DONOTASK ON has NOT been specified, SILENTDROP <num> specifies the number of files or directories up to which BenchTrash will not show a confirmation requester and will delete the files silently. E.g. if this is set to "2", more than two files must be dropped on the BenchTrash to get the confirmation requester, less files will be deleted without asking first. The default for this option is "0", i.e. show the requester regardless of the number of files. This option has no effect if DONOTASK ON is specified.
NOACTIVATE ON tells BENCHTRASH not to activate its progress bar on open. The default is to activate it.
DONECMD <command> specifies a standard Amiga Shell command line that will be executed every time BENCHTRASH finishes its work.
If MODE GLOBAL has been specified, TRASHDIR <dir> specifies the FULL path to the directory to be used as global trashcan. Default is "SYS:Trashcan".
If MODE GLOBAL has NOT been specified, LOCALTRASHDIR <dir> specifies a path relative to a volume, to be used as local trashcan of that volume. Defaults is "Trashcan". This directory must lie in the root directory of all volumes and will be used as "ordinary" trashcan directory.
If neither MODE GLOBAL or LOCALTRASHDIR <dir> have been specified, TRASHPATTERN <pattern> specifies a file pattern BENCHTRASH will use to scan for local trashcans. It will check all directories that match this pattern. If a directory is found that comes with a valid "Trashcan" type icon, this directory is used as replacement. However, since the disk must be scanned for this operation, it will be usually much slower.
If NEWICONS is specified, BENCHTRASH will try to use the "newicon" library to display the trashcan image in its window.
EJECT <drv>=<command> specifies a device together with a command that will be executed if an EJECT request for the drive is requested. For example:
Starting with release 1.08, DiskSafe can also recognize ejectable drives by the exec device and unit number. Insert a slash "/" instead of a equal sign and give the exec device name behind it, replace "device" by the unit number. The example above is *almost* (if you don't use the MultiFileSystem) equivalent to:
A very common usage is to eject a IOMega "ZIP" floppy with Oliver Hitz's ZipTools or ZJTools (can be found on Aminet "ZipTool.lha"):
If your SCSI device driver is called "oktagon.device" and the ZIP is set to SCSI unit 6, the line above is *almost* equivalent to:
Wildcards have been introduced to BenchTrash. It is now also possible to match complete classes of devices. Here one example:
If you need the percent sign itself in the ejection command for whatever reason, escape it with another percent sign, i.e. the pattern "%%" is replaced by "%":
Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.