home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 53
/
af053sub.adf
/
quicktools.lha
/
QuickTools.doc
< prev
next >
Wrap
Text File
|
1993-09-14
|
10KB
|
260 lines
930915 QuickTools Release 1.0
Requires an Amiga with OS compatible with Workbench 2.04.
Copyright © 1993 Ultima Thule Software, All Rights Reserved.
Author: Eivind Nordseth
This package is NOT public domain, but freely distributable. This means
that you can copy it and give it to all your friends, upload it to a BBS or
include it in a PD-library. The only restrictions are: All the files
included in this archive must be in their original form without additions,
deletions or modifications of any kind. QuickTools may not be distributed
for profit. Only a nominal charge may be associated with its distribution.
If you want to distribute QuickTools along with any commercial product you
need written permission from the author. QuickTools is provided "AS IS"
without warranty of any kind, and the author is not responsible for any
damage this software may do. (Just in case :-)
BACKGROUND:
~~~~~~~~~~~
This package started with Qcd (Quick Change Directory) a few years ago. Qcd
was made because I was tired of writing long pathnames when I should move
around on my harddisk. I had seen a utility on PC which did CD to
directories by writing a part of the directory name (NortonCD). I wanted to
make something like it on the Amiga. Up the years Qcd has been improved and
I got the idea to make a search package for both files and directories. And
here it is: QuickTools.
QUICKTOOLS PACKAGE
~~~~~~~~~~~~~~~~~~
This package consist of:
- quicktools.library: This library contains the search-routines for
searching in the database.
- GetQInfo: Scans disks to build up the database of files and directories.
- Qcd: Change directory by searching the database.
- QFind: Find files in the database.
- QPop: Commodity for finding files and directories.
- QAsn, Qdir: Scriptfiles using Qcd.
If you want to use the search routines in the library from your own
programs, the autodocs and includes for the library are included in this
package.
INSTALLATION
~~~~~~~~~~~~
The installation is quite simple. Just copy the library to LIBS: and put
the executables from the bin directory somewhere in your path. Qcd and
QFind is pure and can be made resident. (If the pure-bit is off on your
copies, use Protect to set it on.) If you want QPop to start up every time
the computer boots, you can drop the QPop icon in the WBStartup drawer. The
scriptfiles from the S directory should be in the S: directory. (If the
script-bit is off on your copies, use Protect to set it on)
USING WILDCARDS
~~~~~~~~~~~~~~~
All programs using quicktools.library for searching will allow the use of
standard AmigaDOS wildcards. A '#?' wildcard is automaticaly added to every
file and directory name used for searching. So searching for 'tes' equals
searching for 'tes#?', and searching for wo:sou/qto/#?.c equals searching
for 'wo#?:sou#?/qto#?/#?.c#?'.
GETQINFO
~~~~~~~~
Before you can use Qcd, QFind and QPop you must use GetQInfo to obtain the
database for the library. The database is stored in S:QuickTools.Dirs and
S:QuickTools.Files.
The parameters GetQInfo takes is:
DRIVE/M - Drives to scan for files and directories.
USAGE/S - Show help. Same as using no parameters.
Example:
GetQInfo System2.0: Work:
Scans drives System2.0: and Work: for directories and files and stores
them in the database.
You should also use GetQInfo often to update the database. It is possible
to stop GetQInfo while scanning without destroying the database by pressing
CTRL-C.
QFIND
~~~~~
QFind uses the database to search for files. It takes just a few seconds to
search trough the database, while ordinary file-searching program could use
several minutes.
The parameters QFind takes is:
FILE - Partial path and/or partial filename to search for.
USAGE/S - Show help. Same as using no parameters.
Examples:
QFind qfi
Search for files in database matching 'qfi#?'.
QFind tes/qfi
Search for files in database matching 'qfi#?' and with a parent directory
matching 'tes#?'
QPOP
~~~~
QPop is a Workbench commodity which searches for files or directories with
quicktools.library. It's quite simple to use, one just write the search
specification in the string gadget and press enter. All the entries in the
database that match the search spesification are then shown in the the
ListViewGadget. The ListViewGadget can be scrolled with the cursor keys in
combination with shift and ctrl. Located at the bottom of the window are
gadgets labeled 'Hide', 'Cut', 'Copy' and 'Type'. The 'Hide' and 'Quit'
gadgets are standard commodities gadgets. 'Cut' copies the selected entry
in the ListViewGadget to the clipboard and hides QPop. 'Copy' does only the
copying to the clipbroard. To retrive the text from the clipboard, you
could use a tool for pasting text from the clipboard to the input stream
(Snap could be used). It is also possible to paste text to a console window
by using R-Amiga V if the program using the console supports it. The 'Find'
cycle gadget switches between file and directory searching. Pressing return
when the string gadget is not active has the same effect as pressing the
'Cut' gadget.
QPop takes its parameters as tooltypes:
CX_PRIORITY, CX_POPKEY, CX_POPUP - Standard commodities toolstypes.
FINDTYPE - Which searchtype to start with. Possible values are 'File' and
'Dir'.
QCD
~~~
Qcd is the main reason for making this toolpackage, and is perhaps the CLI
utility I use the most. With Qcd you could change to any directory on the
disks in the database by just giving enough of the name and/or path to
identify it. As the other QuickTools utilities Qcd also support use of
wildcards. Before any searching in the database is done, Qcd tests if the
parameter is a directory relative to the current directory by trying to
change to a directory with the name of the parameter. If this fails the
database will be searched. This means that after you have installed Qcd on
your system you don't have to use the old CD command.
The parameters Qcd takes is:
DIR - Partial path and/or partial name of directory to change to.
SEARCHES/N - Change to the n'th directory matching the DIR parameter.
SHOW/S - Show the full path and name of the directory Qcd changed to.
Handy in scriptfiles.
USAGE/S - Show help.
Special cases of the DIR-parameter:
'-' : Changes to the directory which last was current. Qcd stores the
previous current directory in a local environment variable called
'QCDLASTPATH'.
'..' '...' '....' : Go up one [two][three] directory levels.
If more than one directory matches the DIR parameter and the SEARCHES
parameter is not used, a requester with all the matched directories will pop
up. This requester can be controlled with the mouse or cursor keys in
combination with shift and ctrl. The return key equals the 'OK' gadget and
the ESC key equals the 'Cancel' gadget.
Examples:
If you want to change to a directory with the following path:
'Harddisk0:Work/SAS/SelfMade/QuickCD'
It's several ways to do it:
You can write: 'Qcd Harddisk0:Work/SAS/SelfMade/QuickCD' (the hard way)
Or : 'Qcd hard:/sas//quic'
Or : 'Qcd Self/Quick'
Or : 'Qcd :///#?cd'
Or : 'Qcd QuickCD'
Or just : 'Qcd qui' (the fast way)
And bang, you are in 'Harddisk0:Work/SAS/SelfMade/QuickCD' !!
Quite nice eh!!
If you think it will be hard to remember to write Qcd instead of CD, can you
use the alias command 'Alias CD Qcd'.
SCRIPTFILES
~~~~~~~~~~~
There are also two scriptfiles which uses the Qcd utility.
Qasn: With this script can you do assigns as quick and easy as CD's with
Qcd.
Usage: Qasn [logical_name:] [dir] [SEARCHES]
Qdir: Dir any directory quick and easy.
Usage: Qdir [dir] [SEARCHES]
If you want to use Qcd in your own scripts, here are the error codes Qcd
returns:
OK (0) - Everything is ok.
ERROR (10) - The directory given as parameter doesn't match any directorys
in the database.
FAIL (20) - A serious error has occured. Either are the datafiles
missing, directorys in the database doesn't exist or the
change to last current dir function failed.
KNOWN PROBLEMS
~~~~~~~~~~~~~~
When using Qcd in combination with custom shells, there could be problems
with the path in the prompt update after changing directory. This is *not*
a bug in Qcd. The problem is with custom shells who doesn't use the correct
store for the path used in the prompt. So if you experience this problem
flame the author of the shell and not me :-)
One workaround could be:
Rename Qcd to Qcd.bin and a script like this:
<--------------- cut here ----------->
.key DIR,SEARCHES,SHOW,USAGE
Qcd.bin <DIR> <SEARCHES> <SHOW> <USAGE>
cd >NIL:
<--------------- cut here ----------->
The following workaround could be used with WShell:
Alias cd LITERAL "parse arg $1;'qcd' $1;'cd >nil:'"
RELEASE HISTORY
~~~~~~~~~~~~~~~
930915 - QuickTools Release 1.0:
- quicktools.library 2.43
- GetQInfo 3.120
- Qcd 3.93
- QFind 1.48
- QPop 1.97
THANKS
~~~~~~
Thanks go to:
- The betatesters: Petter Nilsen, Tommy Larsen, Marius Mortensen,
Flemming Andreassen.
- Tommy Hansen for posting the WShell workaround to c.s.a.applications.
- Marius Mortensen (again) for thanking me for Qcd in Offline.doc. :-)
- Ola Fosheim Grøstad, Marius Mortensen and Espen Lyngaas for bug reports
and/or suggestions on earlier releases of Qcd.
- Amiga for being such a great computer with such a great OS.
HOW ABOUT SOME FEEDBACK
~~~~~~~~~~~~~~~~~~~~~~~
Please send donations, bug reports or a list of features you would like to
have included in future releases to:
Eivind Nordseth
Herman Krags Vei 17-21
N-7035 TRONDHEIM
Norway
Email: eivindno@idt.unit.no
You can also get in touch with me at the following BBSes in Norway:
Ultima Thule BBS, Barents BBS, Crusaders BBS, Rodeløkka BBS and
Mediafoto BBS.