@DATABASE LhADir.dopus.guide
@AUTHOR "Edmund Vermeulen"
@(C) "Copyright © 1993-1994 EAV Productions International"
@$VER: LhADir.dopus.guide 1.8 (24.7.94)

@WIDTH 76
@NODE MAIN Contents

@{B}Contents@{UB}

@{" Description " LINK Description}		What is LhADir.dopus?
@{" Installation " LINK Installation}		How to install it on your system.
@{" Supported commands " LINK Commands}	What can it do?
@{" Some tips " LINK Tips}		For speeding up and memory shortage.
@{" Known problems " LINK Problems}	Nothing's perfect.
@{" Revision history " LINK History}	Changes to the program.
@{" Copyrights " LINK Copyrights}		Legal credits.


This is the AmigaGuide® documentation for:

@{B}LhADir.dopus 1.8@{UB}

Copyright © 1993-1994 EAV Productions International
Placed in the public domain. No restrictions on distribution or usage.

Author:	Edmund Vermeulen
	Primulastraat 2
	3202 RN  Spijkenisse
	Holland
	Tel. 01880-13925

Fidonet: 2:286/407.48
Internet: edmundv@grafix.wlink.nl

Please report all bugs, problems and suggestions to the address above.

@ENDNODE
@NODE Description

@{B}Description@{UB}

LhADir.dopus is an ARexx script for Directory Opus that allows you to show
the contents of LhA archives in a DOpus window and operate on the files and
directories inside an archive as if it was a normal directory.

With LhADir.dopus you can:

 - browse through the directory structure of an archive file
 - read/play/show/etc. files from an archive
 - delete files and directories with the Delete button
 - extract/add files and directories with the Copy or Move button

LhADir.dopus has been tested with @{"Directory Opus 4.12" LINK Copyrights} and @{"LhA 1.50r" LINK Copyrights}.


@{B}Other features@{UB}

These are the features that set it apart from other DOpus LhA interfaces.

 - needs only one extra user interface button (GetDir/Browse)
 - only one script, the function it performs is specified by an argument
 - works with more than one copy of Directory Opus running
 - view an archive in an archive by extracting it from it's mother archive
   to 'T:' or the current destination directory
 - show a file's internal version string in the title bar
 - deletes strange file names like '#?' without a problem
 - using it is safe (I use it nearly every day myself)
 - create new (empty) LhA archives with the MakeDir button
 - copy/move between two archives (via T:)
 - date stamps, attributes and comments are listed and preserved correctly
 - unpack DMS files to disk with progress indication, error report and the
   ability to break.

@ENDNODE
@NODE Installation

@{B}Installation@{UB}

@{B}1.@{UB} Copy the file 'LhADir.dopus' to your 'REXX:' directory.

Please make sure that the script bit of 'LhADir.dopus' is set, otherwise
double clicking on LhA archives won't work.

@{B}2.@{UB} Make sure ARexx is activated.

You can activate ARexx by double clicking the 'RexxMast' icon in the
'System' drawer. If you would like ARexx activated every time you boot, you
can place the 'RexxMast' icon in the 'WBStartup' drawer or add the line
'RexxMast >NIL:' to the 'S:User-Startup' file with a text editor.

@{B}3.@{UB} Change the config to call LhADir.dopus for the functions you wish LhADir
   support.

Before changing your own DOpus config you may first try out LhADir.dopus by
using the supplied example config. You can open the example config
'LhADir.CFG' by choosing 'Open' from the menu on the Configuration main
screen in Directory Opus.

When changing your own config you may examine the Buttons, Filetypes and
Menus parts of the supplied example config.

In short this is how to call LhADir.dopus:

 - For Buttons and Menus set the cycle gadget to 'ARexx' and choose
   'LhADir.dopus' from the file requester. Add one of the @{"supported commands" LINK Commands}
   as an argument to the command line (e.g. 'LhADir.dopus Copy' for the Copy
   button).

 - In Filetypes set the cycle gadget to 'AmigaDOS' and enter
   'REXX:LhADir.dopus GetDir {p} {o}' for double-click. For click-m-click
   the 'GetDir' command should be replaced by 'Browse'. In the flags area
   you must switch on 'Run asynchronously'. All other flags should be
   switched off.

@ENDNODE
@NODE Commands

@{B}Supported commands@{UB}

LhADir.dopus supports the following commands:

 GETDIR, BROWSE, PARENT, ROOT, DELETE, COPY, MOVE, MAKEDIR, GETSIZES,
 READ, ANSIREAD, HEXREAD, SHOW, PLAY, LOOPPLAY, PRINT, ICONINFO, RUN,
 VERSION, UNDMS, MULTIVIEW, AMIGAGUIDE, VIEWTEK, RETINADISPLAY.

When calling LhADir.dopus one of these commands must be passed along as an
argument. They are not case sensitive.

Note that all of LhADir.dopus' functions work equally well on listed
archives as on normal directory listings. This means that you don't have to
define two buttons for one function. Instead, you can change the existing
buttons to call LhADir.dopus.


GETDIR

 Lists the contents of the selected directory or LhA archive file in the
 same window.
 If nothing is selected, the current directory or archive will be rescanned.
 The default keyboard shortcut for GETDIR is RAmiga-G.
 Note that within a listed archive you cannot double click a directory to
 list it. If you do so by mistake, use the GETDIR button to list the
 directory anyway.

BROWSE

 Works identical to the GETDIR command, but instead uses the opposite window
 for listing the files and directories. The default keyboard shortcut for
 BROWSE is RAmiga-B.

PARENT

 Lists the contents of the parent directory.
 Within a subdir of a listed archive you cannot use the window's border as a
 parent button. If you do so by mistake, use the GETDIR button to list the
 directory anyway.

ROOT

 Lists the contents of the root directory.
 Within a listed archive this function will always list the directory where
 the archive is in.


DELETE

 Deletes all selected files and directories.
 Please note that when deleting from an archive there is no way to get the
 deleted files back, so be careful! LhADir.dopus will honour the config
 setting about asking before commencing deletion.

COPY

 Copies all selected files and directories to the destination specified in
 the opposite window. Both source and destination window can be either a
 normal directory or a listed archive.
 Note that when copying between two archives the 'T:' directory will be used
 as an intermediate. This means that there must be enough memory available.
 Also note that when copying files to a subdir within an archive all files
 will also be placed in the 'T:' directory first before they can be added.
 Further note that when extracting directories within a subdirectory, all
 selected entries are first extracted to a special directory named 'LhADirX'
 and afterwards moved to the correct destination. So don't be alarmed when
 you see the move operations in the title bar.

MOVE

 Identical to COPY, except that the selected files and directories are
 deleted after they have been copied successfully.

MAKEDIR

 Creates an empty directory.
 With MAKEDIR it's also possible to create a new (empty) LhA archive file.
 Just enter the archive's name (ending in '.lha').

GETSIZES

 Calculates the size of all selected directories by adding up the size of
 the files they contain.
 With listed archives a directory's date and time will also be set in
 accordance to the newest file it contains.

READ, ANSIREAD, HEXREAD

 These are asynchronous internal Directory Opus commands.
 If the active window is a listed archive then the first selected file will
 be temporarily extracted to 'T:' and viewed.

SHOW, PLAY, LOOPPLAY, PRINT, ICONINFO, RUN

 These are normal internal Directory Opus commands.
 When the active window is a listed archive then the selected files will be
 extracted one by one to 'T:' so that they can be showed, played or
 whatever. After viewing a file it is removed from 'T:' immediately. Note
 that when working on multiple files it's always possible to abort by
 pressing both mouse buttons in the DOpus window.

VERSION

 Searches the first selected file for it's internal version string, which is
 then shown in the title bar.
 It accomplishes this by calling the AmigaDOS 'Version' command.
 When the active window is a listed archive, the file will be extracted to
 'T:' first and removed afterwards. If nothing is selected the version in
 the file 'REXX:LhADir.dopus' is searched.

UNDMS

 Unpacks the selected DMS files to disk.
 For this command to work you will need the DMS utility. The user can select
 either 'DF0:' or 'RAD:' as the destination drive before each file.
 Unpacking will start immediately, so be sure that there's a disk present.
 In the case of 'RAD:', it must be mounted and have a 'HIGHCYL' of 79. When
 the active window is a listed archive, the file will be extracted to 'T:'
 first and removed afterwards. The tracks are displayed on the top line as
 they are unpacked. If an error occurs the display is beeped; all errors
 will be displayed in a requester afterwards. It's possible to break the DMS
 process by shortly pressing both mouse buttons in the DOpus window. It may
 take a while before DMS reacts though. Note that when using DMS 2.04 you
 must use the English version for the UNDMS command to work.

MULTIVIEW, AMIGAGUIDE, VIEWTEK, RETINADISPLAY

 These are external programs that are called from within LhADir.dopus.
 All selected files will be passed along to the external program one by one.
 With listed archives the files are extracted as needed. Note that when
 working on multiple files it's always possible to abort by pressing both
 mouse buttons in the DOpus window.
 If you haven't got these external programs or keep them in a different
 directory path than I do, these commands won't work. You may edit the path
 yourself if you wish. You can also add support for other external programs
 by editing the ARexx script yourself. This isn't very difficult to do.
 Note that Multiview and AmigaGuide will try to open their window on the
 public screen Directory Opus is running on.

@ENDNODE
@NODE Tips

@{B}Tips for speeding up@{UB}

The following measures help speed up the operation of LhADir.dopus and stop
disk access when using one of it's functions:

 - Copy 'LhADir.dopus' to 'RAM:' and make a multiple assignment for 'REXX:'
   with 'RAM:' as the first one. For example: 'Assign REXX: RAM: S:' for the
   standard setup. This way the ram disk is searched first but the rest of
   your ARexx scripts are still accessible.

 - Make 'LhA' resident by executing the command 'Resident C:LhA'.


@{B}Tips for memory shortage@{UB}

LhADir.dopus uses the 'T:' directory for temporary stuff. Like when copying
to a subdir within an archive, copying between two archives and viewing
files from an archive. Normally 'T:' is assigned to the ram disk, so when
there is a memory shortage, these operations will fail. The solution is to
assign 'T:' somewhere else, for instance to your hard disk. Simply go to the
Workbench and choose 'Execute command' from the menu and enter something
like 'Assign T: HD0:Trashcan'.

@ENDNODE
@NODE Problems

@{B}Known problems@{UB}

LhADir.dopus fools Directory Opus into thinking listed archives are regular
directories. This has several advantages, but also some disadvantages:

 - Double clicking on files or directories won't work.

 - Using the window's border as a parent button within a subdir won't work.

 - The config setting 'Re-read changed buffers' must be switched off,
   otherwise DOpus will try to re-read listed archive windows; which it
   can't.

 - Using the normal 'Arc Ext' button by mistake with a listed archive in the
   destination window results in all the files being extracted to Directory
   Opus' current directory. Quite a mess!

@ENDNODE
@NODE History

@{B}Revision history@{UB}

Version 1.0 released 21-07-1993

Version 1.1 released 16-08-1993

 - Fixed several problems regarding file names containing wildcard
   characters like '[]()#~%|*'. For example it was not possible to read such
   a file.

 - Delete stopped when it ran into a file containing spaces. (I forgot the
   quotation marks.)

 - Added ICONINFO and RETINADISPLAY commands.

 - Fixed problem with internal deletes on delete protected files.

 - It's now possible to copy over existing files in an archive.

 - Doesn't re-list the archive's contents anymore after deleting from it.

 - Cleaned up code. Size is now smaller!


Version 1.2 released 30-09-1993

 - Added AMIGAGUIDE command (external program) for pre KS3.0 users.

 - Added GETSIZES command and removed the automatic dir size calculation.
   Listing archives with lots of files in dirs is now up to 40% faster.

 - Both internal and external commands will now work on all selected files
   instead of just the first selected.

 - It's not possible anymore to compile LhADir.dopus with the Rexx Plus
   Compiler due to the use of the interpret command. If anybody cares about
   this please contact me for a change.

 - Documentation is now in AmigaGuide format.

 - Example config is now in Directory Opus 4.1 format.


Version 1.3 released 25-11-1993

 - Asynchronous internal DOpus commands (READ, ANSIREAD and HEXREAD) now
   only act on the first selected file.

 - Added the possibility to abort when viewing/playing/etc multiple files by
   pressing both mouse buttons in the DOpus window.

 - MultiView now opens it's window on the DOpus public screen.

 Thanks to Andrew de Jong for reporting the next 3 problems:

 - Fixed problems with file and dir names with leading blanks.

 - MakeDir didn't work with dir names containing spaces. (I forgot the
   quotation marks again.)

 - Fixed problem with some PC generated .lzh files with strange date fields.


Version 1.4 released 6-1-1994

 - Fixed all problems with file names containing pattern matching tokens
   like '#?|%()[]*~'. It is now safe to delete files with names like '#?' or
   '*'.

 - Now generates an error when trying to read/play/etc. directories from a
   listed archive.

 - An archive in an archive can now alternatively be extracted to the
   current destination window instead of 'T:'. Just select 'Cancel' the
   first time.

 - Doesn't leave icons lying about anymore when only the setting 'Create
   icon with directories' is active.

 - Cleaned up code. Size is now smaller than ever.


Version 1.5 released 18-1-1994

 - Cleaned up code. Smaller again.

 - MakeDir in archives now handles all names containing pattern matching
   tokens.

 Thanks to Jan Lieben for reporting the following problem:

 - Fixed problems with file and directory names containing "'" character.


Version 1.6 released 7-4-1994

 - File and dir names containing a '"' character are now skipped altogether.
   They were causing problems because it's not possible to 'addfile' them
   with Directory Opus.

 - Now handles file comments that contain linefeeds. Before, execution would
   halt with a syntax error. Such comments are only shown up to the first
   linefeed.

 - VERSION will now always show the file's version string, even when a
   different version of that file is already in memory. This was
   particularly a problem with libraries.

 - With Directory Opus 4.12 MultiView and AmigaGuide will open their windows
   on the correct screen when DOpus is not running on it's own screen but
   on another public screen like Workbench.

 - Deselecting in listed archives now reflects how the files and directories
   are actually processed: all at once. It's also faster this way.

 - Removed progress indicator when copying/moving internal.

 - Improved error handling.

 By request from Andrew the Jong:

 - Added MOVE command. It's identical to COPY, except that the selected
   files  and directories are deleted after they have been copied
   successfully.

 - Added RUN command (as an internal DOpus command) for directly running
   executable files from archives.


Version 1.7 released 6-5-1994

 - Made work-around for bug in Directory Opus 4.12 'GetSelected...'
   functions. This bug was causing strange effects on the config; like
   switching the help function on.

 Thanks to Peter Horsmeyer for reporting the following problem:

 - Fixed problem with ViewTek 2.1. The file requester popped up instead of
   showing the picture.


Version 1.8 released 24-7-1994

 - After extracting from an archive the destination directory isn't
   rescanned anymore. Instead the new files and dirs are simply added to the
   window. This is especially quicker for long directories listings.

 - Changed okay button for 'Commence deleting' requester into 'Delete' to be
   the same as in DOpus itself.

 - It's now possible to break (abort) a move operation before it starts
   deleting by pressing both mouse buttons.

 - Doesn't relist the archive from disk anymore after double clicking a
   directory or using the window border parent gadget by mistake. 
   LhADir.dopus should have been doing this all along.

 - Now automatically uses the old -lh1- compression method for .lzh files
   so they can still be extracted by LZ.

 - Changed behaviour of ROOT command. Within a listed archive you are now
   always returned to the directory where the archive is in. This is much
   more useful.

 By request from Andrew the Jong:

 - Added UNDMS command for unpacking DMS files to disk.
   Progress is show on the top line, aborting is possible and all errors are
   displayed in a requester afterwards.

 Thanks to Andrew de Jong for reporting the next 4 problems:

 - Fixed problem with files with an apostophe (') in their name when using
   internal DOpus commands (like READ).

 - Fixed problem with deleting and extracting some files with an apostrophe
   in their name. The downside of this fix is that, because of a bug in LhA,
   it isn't possible anymore to add such files to an archive.

 - Fixed problems with file names starting with '@'.

 - Fixed problems with files larger than 10 Mb. LhADir.dopus used to hang
   when an archive totalled to more than 10 Mb.

@ENDNODE
@NODE Copyrights

@{B}Copyrights@{UB}

Directory Opus is Copyright © 1993 Jonathan Potter/INOVAtronics
LhA is Copyright © 1991,92 Stefan Boberg
ARexx is Copyright © 1987 William S. Hawes
AmigaGuide is Copyright © 1991-93 Commodore-Amiga, Inc.

@ENDNODE
