FastFind II is a program to rapidly find files across all your WIN drives using criteria such as the file name, extension, date, time, size, type and contents. You can specify the files you are looking for using wild cards and simple conditions. You can do very rapid secondary searches on selections of files that have already been collected.
The QL was designed to be a modular system; lots of different little systems extensions, programming toolkits and "proglets" doing their bit rather than those fat, monolithic all-singing-all-dancing programs of yore that would do everything except walk the dog.
So, to get the best out of this program you need other software that this program relies on or can deploy. Any self-respecting bleeding edge QLer will load most of these by default anyway!
FastFind II is a fairly complex program. Theres a lot to take in. So start simple and dont give up! Once you get the hang of it you should find it simple to use. You may then find yourself asking "I wonder whether FF2 can do this, or be made to do that .." And hopefully you will find that it can!
Qdos needs to be Minerva V1.98+ (This program wont work as it should under plain Qdos! So read references to Qdos below as Minerva.)
Qdos: TK2 V3.22+, PE (ptr_gen V2.06+, wman V2.09+, hot_rext V2.31+), and optionally Home_bin V1.00+. (Currently FF2 relies on the History device present in SMSQ/E. Unless this is available for Qdos the program, as it stands, will fail. This may be sorted in a later version.)
SMSQ/E needs to be V3.36+
Qdos and SMSQ/E both: Qlib_run V3.36+ or equivalent, ptrmen_cde V4.10+, FileInfo2 V3.50+ , Qmenu (Menu_rext) V8.05+, sound_bin V1.01+* (These three latter could be optional, depending on configuration settings: Actions = 0, sound = 0 or 1).
* sound_bin is not required by SMSQmulor as its functionality is built inA text editor or viewer is handy - I use both JMS'es QD and DP's The Editor - as is a File manager. Qjump's Qpac2 is highly recommended, but not obligatory, as other programs may work too - or you might make do without any.
At a pinch, this program MAY work with earlier versions of toolkits etc than stipulated. If you encounter problems, however, your first step should be to update your software!
The BASIC source code will only run in SBASIC. To run it you also need the included toolkits FF2_bin and QHP_bin, as found in the <home>bin_ directory.
An initial scan of one of my hard drives containing some 13k files, takes 3 to 4 seconds on a "standard" PC running QPC2, and about 6 seconds running SMSQmulator. A secondary search, ie to search the list of pre-scanned files for, say, all files with "test" in the name (there were about 250 of them), took less than a second. On a Q68 the initial scan took some 4-5 minutes. After that, things improved a little, ie the secondary search took about 12 seconds. Rather a long wait to my mind, but perhaps its about what one is used to..
I tested this program on a RaspberryPI B4+ sporting SMSQmulator. The same initial scans as above took about 24 seconds and 3 to 4 seconds, respectively. So I suggest the RasPI B4+ is a minimum hardware spec for using this program as a serious piece of software. JM2dW.
Also you require at least one "Winchester drive", plenty of spare RAM and as much screen acreage as you can manage. A functioning sound system is nice, otherwise youll have to make do with BEEP or blessed silence.
To check you have everything you need, you could do worse than run the included boot program, <home>boot. Then either EXECute the program in the normal way or add it to a Hotkey for quick and easy access.
The boot program is not able to check software versions in all cases, so a "pass" may not accurately reflect compatibility!
The program furniture is as follows:
The top bar is the Title bar. HIT and HOLD this to drag the window to where you want it. Qdos users, and SMSQ/E users who have their WM_MOVEMODE setting set at 0, will get the standard window move sprite and will know what to do with it.
On the left side of the Title bar is the window resize button. HIT it to resize the window in the normal fashion; DO it to let the window automatically be resized to the optimal size for the contents. Once you have DOne the latter, on the next file selection the window will automatically adjust to optimal. To revert to sanity just HIT the resize button again and set the size you like and it will stay that way until the next time you do a DO.
On the right hand side of the Title bar is the standard Sleep button. (Sleep requires Qpac2)
To quit the program just DO the title bar. If there is no present file selection, the program will terminate. If there is an active selection, youll have to confirm with a <Y>es, <ENTER> or DO. There are also commands for Sleep and Quit (see below).
The next window down is the main display window. When there are files to display moving the mouse up or down highlights the current file name. HITing a file name toggles selection (and stuffs the file name into the Stuffer Buffer). DOing a file name does some action on that file (more of which below).
If there are more file names than can be displayed use Page Up/Down or Shift Up/Down to scroll up or down a page. Alt Up/Down takes you to the first or last page. The scroll wheel on your mouse should also work as expected.
To the right of the main display is the Scroll Bar. If there are more file names than can be displayed the scroll bar is drawn in proportion of the current display to the total number of file names. HITing the scroll bar window pages the display to approximately that spot in the total file list. DOing the top half of the scroll bar window takes you to the top of the display; DOing anywhere on the bottom half brings you to the end of the display.
Under that is the Command line/window/bar. DO it to start with a blank line to enter commands, or HIT it to edit a previous command. You can also hit TAB to get to the command line.
Arrow up or down takes you through the History of search commands this session, unless you have given the History a name (see Config, below) in which case the Search History will persist until you reset your computer.
Below the Command line is the Message line/bar.
To the right of the Message bar are three buttons displaying numbers. The first of these is the Selection Counter. This shows the number of file names you have manually marked for selection.
The next button is the Count button and shows the total number of files in the current Selections Set.
The final button is the Level Button, and shows the Selection Level. The lowest selection level is -1, ie there is nothing to display. The first level is 0; this is the basic file scan. Levels above 0 are subsets of previous selections. Levels go from 0 to 9.
You mark a file name by HITing it, and unmark a marked file name the same way. In doing this the file name is entered in the Stuffer Buffer, as with Qpac2 Files. <ALT><SPACE> (or <F12> in SMSQmulator) stuffs it into any current keyboard queue.
To mark multiple files in one go, mark a file name and then hold Shift while marking another file. Those files and all files in between will be marked.
HITing the Select Button, reverses the currently marked file selection. DOing the Select Button marks all files.
When you have a group of manually marked files, HITing the Count Button selects the files in a new level. If there arnt any marked files, or the level number has reached nine, nothing happens.
DOing the Level button:
If the level is zero you are prompted as to whether you wish to zap the selection, ie reset the data.
If the level is above zero it is zeroed.
If the level is above zero and you HIT the Level button you get a menu with possible selection levels. Click one of those to reset to that level (all higher levels are now forgotten).
There are commands to do all that these buttons do. You can also use shortcut keystrokes to activate these buttons: S for select, R for refine, L for level. The keystrokes all act as HITs on these buttons.
Finally, you can resize the window by clicking on the bottom border of the display. Drag the frame to the size you want and click again to have the window redrawn at that size.
There are two fundamentally different search modes: File Scan, which filters the basic list, and List Search, which searches the filtered list.
The File Scan is the initial scan of the drives. This happens when the Selection Level is at -1. The result of this scan seeds the initial list. This scan can potentially take a long time so it may be tempting to restrict the scope of the scan. This can be done by restricting the number of drives to be scanned or limiting the number of folders (directories) to be traversed. Limiting the scan by further search criteria wont speed up the scan, but will limit the resulting list.
Note: There is no practical limit to the number of files that can be included in the list, memory permitting.
Subsequent searches can be done on the initial list, designated Level 0. This is termed the List Search. Doing a list search is very much faster than the File Scan. However, files that have not been included in the initial scan are not searched, and any files that have been added to the drives since the scan will be invisible. Files that have changed meantime will show up with out of date information.
As a general rule it makes sense to do an initial scan of drives you intend to be active on, eg w=124. This may take a little while, but for, perhaps, the rest of the session you only need to search that list, giving almost instantaneous results. If the odd search has to be done on a drive not part of the initial scan one could start a new session of FastFind II to search just that drive.
If there are files open for writing on a device during an initial scan you will get an error message. The scan pauses until you acknowledge the error by pressing a key. You can then rectify the problem by closing the file or removing the annoying program that caused it and FF2 will try once again. If this fails the file that caused the error will be ignored and not be included in the list.
Only those values that are specified are compared in the search. At least one term has to be given to be considered a valid search command. For the initial File Scan, if w has not been specified a w=1 will automatically be added. For List Search no w is needed.
Ten keys or variables are defined:
Symbol | Meaning |
---|---|
w | win = drives |
f | folder = directory |
n | name = file name sans folder or extension |
x | extension - separator plus 1 to 4 characters * |
d | date = date only |
t | time only |
s | size = file length |
k | kind = type - 0 to 255 |
Sometimes files may be missed because what to us may seem like an obvious file name, is seen by the program as a file name plus extension! Is, for example, "test" in myfile_test part of the name or is it an extension? This program is configured to see anything of up to 4 characters after the last _ or . as an extension. So if you are searching for n=myfile_test you wont find it! But for example help_index is seen as a file name with an underscore in it.
Symbol | Meaning |
---|---|
> | search within current selection (if omitted list search always starts at level 0 |
= | All (see below) |
c | contents |
? | don't care character for contents (Not implemented yet!) |
The permitted operators are:
Symbol | Meaning |
---|---|
= | equals (approximately) |
> | variable is greater than value |
< | variable is less than value |
The formal syntax of a search command line is:
<term> {<space> {<space>} <term>} | <end of line> <term> =: <key> {<space>} <operator> {<space>} <parameter> <operator> =: = | < | > <parameter> =: <value> | <list> <value> =: [" | '] <pattern> [" | '] | <number> <list> =: <number>{,<number>} <pattern> =: text | WIRX pattern | coded string where | a vertical bar indicates a choice and can be read as 'or is' [ ] square brackets indicate an optional piece of syntax that may appear 0 or 1 times { } curly brackets indicate a repeated piece of syntax that may appear 0 or more times
This description though not exhaustive is hopefully sufficient to give a general idea. The description of each term, below, should fill in the details.
If a pattern contains a space or a quote character the pattern must be enclosed in a matching pair of single or double quotes.
What the values the parameters have is determined by the key:
Parameters can be either a string pattern or a list of numbers.
In most cases text patterns can be specified in the WIRX syntax (defined and explained in Appendix B)
Lists are a comma-delimited list of, usually, numbers. There must not be any spaces between items in the list, as space terminates. If one or more spaces are intended as a literal part of a list, the whole list must be enclosed in a pair of matching quotes.
Terms can be entered in any order. The search priority will nearly always follow this order: w12345678, k, d, t, s, n, f, x, c. (The order is slightly modified in certain circumstances.) Items that are not specified in the search command are simply skipped.
w = 123.. or 1,4,2.. or w = "8 2 3 ".. Specifies the WIN drives to search. Each item can be from 1 to 8, not necessarily in any particular order (The actual order of the search, however, will always be 1..8) No item should be repeated (if they are theyll only be searched once) No spaces are permitted between items in the list (unless its quoted, as above). If no w variable is specified in the initial file scan a w=1 term is inserted. Note: If you have renamed your win device, eg WIN_USE HDR, you still must use w as the drive key. FF2 will find the correct device and display it as you have named it. f = pattern, eg !TEST WIRX pattern to match against part directory name. When performing a File Scan, if the folder search string is Anchored to the start, then only those folders will be scanned. When used during a List Search normal WIRX pattern matching is performed on all the folder names contained in the list at the current level. n = pattern, eg na*me WIRX pattern to match against the file name. The pattern is taken to fit any part of the file name unless it is "anchored". (See "About search patterns", below) x = pattern, eg txt;doc WIRX pattern to match against the file name extension. If the pattern is given without an extension separator a WIRX ? is automatically added so the pattern will match both .ext and _ext. If either a dot or an underscore is given by the user, then only that separator will be used in the match. d =, <, > followed by date parameter A date parameter is a number, or a comma-separated list of up to three numbers: 2023 => 2023,1,1 90 => 1990,1,1 A year number between 61 and 99 are taken to mean 1961 to 1999 (but only until the present year reaches 2061, thereafter the lower limit is always <this year> - 1) A year number 00 to 97 are taken to mean 2000 to 2097 (the max year) 2020,12 => 2020,12,1 99,10,3 => 1999,10,3 If the equals operator is given, d may only appear once in the command line. The date given will then match <date>00:00:00 to <date>23:59:59 If d < date1 is given a d > date2 MAY also be given and vice versa. If date1 is greater than date2 the dates are swapped. (you cant match a date that is both less than, say, 2000 AND greater than 2020) d=2020 implies 2020,01,01 00:00:00 <= date <= 2020,12,31 23,59,59 d=2020,10 implies 2020,10,01 00:00:00 <= date <= 2020,10,31 23,59,59 d=2020,06,06 implies 2020,06,06 00:00:00 <= date <= 2020,06,06 23,59,59 t =, <, > followed by a time parameter A time is up to three two-digit numbers separated by comma: hh[,mm[,ss]] where the auto-filled missing bits are set to 0 t = 1 implies 01:00:00 >= time <= 01:59:59 t=1,2 implies 01:02:00 >= time <= 01:02:59 t=1,2,3 implies 01:02:03 >= time <= 01:02:03 This rather odd specification allows one to search for files that were saved at a given time on any date. If a date variable is also specified, dates are filtered before time. Like for date, equals is converted to <= and <= and can only appear once < and > can appear once for each but don't have to: ie d > 2000 on its own implies all datas > 2000:00:00:00 s =,<, > followed by size parameter eg: s > 100 s < 500 As for date and time above equals is converted to < and > bracketing a 10b margin on either side. only one of s =, or one or both of s < and s > may appear on the command line. k = kind = list of file types: k=1,2 or k=1,3,12 If folder (type = 255) is specified in the command all remaining conditions are ignored! (apart from win) and only folder names are returned. (Not yet done.)
Theres a special search function: = <pattern> (yes, just equals followed by pattern). This only works for List Searches. It matches the pattern you enter against the whole line, exactly as shown in the display. The pattern otherwise follows the same rules as for folders and names. (See "About search patterns", below))
Different rules apply to searching on the various file meta data:
The textual data: folder, name, extension can be searched using the WIRX syntax, as described in Appendix B. However, certain tweaks to this syntax are convenient. The pattern entered by the user gets the "match any character" symbol, *, put in front of, and after, the pattern, thus: *pattern*
That is because this is the most common case for searches. It corresponds to S*BASIC's INSTR.
Sometime this automatically tweaked behaviour needs to be overridden:
Folders and names can be "anchored". That means that a special (non-WIRX) symbol can be applied to the pattern to indicate that it must match either the start or the end - or both - of the target string.
Thus "<pattern" will only match the first part of the name, ie it is equivalent to pattern* in WIRX, while pattern> will only match the end of the name, and is the same as *pattern, in WIRX. <pattern> means that the whole name must match.
Since the < and > symbols are not part of the WIRX syntax any other modifying WIRX symbols must come between them. Thus n=<-pattern means "only match names that DONT start on pattern".
A different tweak is added to matching extensions. The "match any ONE character" symbol, ?, is automatically added to the extension pattern. That will match both _ext and .ext. To override it, explicitly add the specific separator you are searching for, x=.bas or x = _txt
Numerical comparisons don't use WIRX (except in the case of the All search, =, where the whole display line is seen as a single string containing numbers and letters).
The wins spec is just a list of numbers representing WIN1..WIN8 . All the search routine does is to confirm that the WIN number, from 1..8, which it intends to try, in that order, is in the search string. Furthermore, it tests the drive physically to see whether it is present, but only during the actual file scanning phase. In the list scanning phase, if the drive you specify is not in the list, you wont get any results.
The type (or k for kind) search string is also a list of numbers. They can appear in any order, but the list must be comma-separated as each number can have 1, 2, or 3 digits, unlike wins.
Content search has, at present, only two refinements: case agnostic and case sensitive searches. The case sensitive search can be in coded digital form (see Appendix A). The search string must be a single word, phrase or code to match a corresponding target in any file that has passed through the filter of all other search criteria.
If the string contains any spaces it must be enclosed in matching quotes If the string contains quotes the quotes must be wrapped in a pair of matching quotes of the opposite kind:
c="hello world!" - matches hello world! or c = '"Hello World!"' - matches "Hello World!" or c = '" '"'" - matches " ' c takes two other modifiers: ! and #. These must be the first character of the pattern (ie outside of any quotes) thus: c = !ABC or c=#"1,2,65,'bc'" ! implies a case-dependent search, ie abc is NOT ABC, only ABC is. This is much faster than the default case-agnostic search # implies a coded, case-dependent search, used for searching for binary data in a file. This search is always case dependent. These two modifiers cant be combined. The coded search string syntax is described in Appendix A ? = <char>, eg ? = \ - Not implemented yet Change the wildcard character for the current search. Default = ?
I hope to be able to add some simple wild cards to the contents search, and possibly some logical operators, such as AND, OR and NOT.
Levels represent searches performed on a previous search result, ie a refinement of the previous search. You might do this to get a quick result initially and then take a closer look. Specifically, you might wish to reduce the number of files to scan for content on slower systems, although in the standard search contents are only scanned if all other criteria match first.
Each search within a previous search implies a higher level of refinement. Only files at the current level are displayed, searched or ordered, although all the file names after the initial scan are still present in memory.
The initial level is -1, ie no search has been performed. The next level is the result of a physical search of all the specified devices. This would not normally be all the available files, only those that were initially selected. Unless you specify otherwise, the next search will only search this subset. To do a search on the physical devices again you need to reset the level to -1. Use the 'r' command for that (see below).
You can also manually select files to create a subset at the next level: Choose the files you want and use the 's' command or press the Select button (see Buttons above).
A number of commands, which are different from searches, may also be given. The syntax is:
<command> [{<space>} [<parameter>]]
Only a single command may be given at the same time. Some commands take an optional parameter or may be followed by a search command string. The command is carried out on pressing ENTER. Pressing ESC leaves the command line without performing the command.
> - continuation character. Search within current selection only. If omitted search always reverts to level 0 (or -1) a - Append list: a {<space>} [<file name>][_lis] Similar to p (print, below), except the list is appended to a previously saved file: Either the named file, the last file written or appended, or the default file, as set in the Config file, is used. You can create a template file to shape the output. See Edit (e), below. <#>, <+> and <$> numbers continue to increment from previous append or print e - Enter template editor - No parameters Here you edit the output list template. If the template is left blank the output format will be identical to the display. The template could be shaped to produce a list of commands for each file instead of the regular display, for example: <#> delete "<fnm>" - produces a line-numbered list of commands to delete all files in the current selection or <#> copy "<fnm>" to 'ram1_<name>(<+>)<ext>' The following substitutions are made if they are encountered in the template. These are identical to the command line substitutions in the configuration file (see Configuration / Command line variables, below). <path> - substituted for devN_dir_ <fnm> - substituted for devN_dirs_name_ext <dev> - substituted for devN_ <dir> - substituted for dir_ <ext> - substituted for _ext <name> - substituted for name <search> - substituted for the search string used on contents In addition you can use three numeric substitutions in the templates: <#> = this is nominally the line number. It is reset when you use Print (p) and continued when you use Append (a). <$> = the same number output in two-digit hex, ie it cycles back to 00 after FF, ie only 16 unique values are possible. <+> = a separate number, incremented after each use, up to 32767. It too is reset on Print, but continued on Append. The number substitutions can be used up to ten times on the same line. Note: The number substitutions are NOT available for use with the command line options of the configuration file, only for the print/append templates. Note: If the line numbers would overflow ( lno > 32766) only an error message to that effect, nothing else, will be written to, or appended to, the list file. g - Go To: g {<space>} <modifier> gt Go to top of selection list gb Go to bottom of selection list gp Go to previous page gn Go to next page i - info: Displays the current wins that were scanned at level -1, the total count and the current count. l - level: l [{<space>} [<level>]] l without parameters => down to the previous level Level 0 is minimum. Level 0 is the lowest level that can be specified with this command. Where the level is specified it has to be any level lower than the current level otherwise the command errors. o - Order list: o {<space>} <criteria> Order uses the same variable letters as search, but the list can only be ordered on w d s f n k x (but not yet on t, and never on c). Capital letters imply the order is from largest to smallest (A..z), while lowercase letters imply the opposite (z..A): o Dn => Order the list according to date, most recent first, followed by names in alphabetical order The order is maintained while levels are being refined, but is lost once levels go lower. Note: At present a slow binary insertion sort is used, so, depending on your system, ordering long lists could take a very long time. 200 items or less should be fine. Experiment! p - Print list p {<space>} [<file name>][_lis] Note: overwrites any previous list with the same name. The current list is saved to the given file name. If a file of the same name already exists, it is overwritten. If no file name or extension is given, the last list file saved, or, if none was, the default file name you set in the Config file is used. If the selection is empty or the level is -1 nothing is overwritten or saved. File names: If no device name is given, ram1_ is used. If no extension is given then _lis is used: p test => ram1_test_lis p test_bas => ram1_test_bas p win1_test => win1_test_lis p win1_tmp_test_txt => win1_tmp_test_txt p dos1_tmp_test.txt => dos1_tmp_test.txt p dos1_test => dos1_test_lis p => last name used is overwritten q - Quit the program. If the level is > -1 you are prompted to confirm. This command must be on its own r - reset level: r [{<space>} [<level>]] Similar to l, above. Resets the list to the level specified, except that if no level given, it sets the level to 0 immediately. If the current level is already at 0, the level is set to -1! Ie this zaps the search list. Out of curtesy, in this case you are prompted for confirmation or rejection. A special case of r! resets the level to -1 irrespective of the current level (except if the current level already is at -1). No curtesy prompt there! z - sleep: Ie buttonise the program. (Requires Qpac2) $ - Special info on heap and memory: S: = size of heap, U: = used heap, F: free memory in heap CK: = number of chunks beyond initial, Fg: number of free space fragments If lots of free space remains after your standard, most used scan, consider reducing the fcmin variable in the config file.
There are two things that may need to be configured for Fast Find: The location of its Home Directory and some various settings for the comfort of the user.
The Home Directory is the directory in which the program and its auxiliary files reside. Under SMSQ/E this is in most cases done automatically via the Home Directory Thing, which is built in to the system. Qdos users can add a toolkit to do more or less the same. Failing that, it has to be hardwired into the program. Use the standard QJump Config utility for that, or JMS's MenuConfig.
Note: Once the Home Directory has been hardwired into the program, as described, it will no longer use the Home Directory Thing, and so will have to be re-configured if moved to a different location. To reset the program to use the Home Thing again configure the Home Directory to blank.
In all cases, SMSQ/E or Qdos, if you put FastFind on a Hotkey, you will have to configure the Home Directory manually, as described above. The only exception is if you use the HOT_LOAD variety.
The FastFind configuration file is a simple text file that can be edited in a standard text editor. The default file is called FF2-XX_cfg, with -XX standing for some version number, and islocated in the program's home directory. The first line in the file is an ID and a version number. If any changes need to be made to the structure of this file it will get a new version number.
You can operate with multiple configuration files for different circumstances. Simply specify the one you want to use on the command line, eg:
EX "<path>FF2_obj"; "*AltConfig"
An asterisk replaces the Home Directory. If the file is located elsewhere the path must be spelt out. Although config files must all have the extension _cfg, you dont have to spell it out (but you can).
This does the same as above:
EX "<path>FF2_obj"; "<path>AltConfig_cfg"
Another way of doing it:
ERT HOT_LOAD1("7", "<path>FF2_obj"; '*Cfg7', "FF2")
A couple of ground rules for the configuration file:
Don't change the order of the keys, or add or delete any keys. Blank lines and lines where the first character on the line is an asterisk, *, are ignored.
In the current version, there are two cases where you can use an asterisk to represent the Home Directory: sound, and palette. In all other cases where a file name is required, for example the name of the list file, the full file name needs to be spelt out. Also in sound and palette a full file name can be used, for example if you wanted to point to locations outside the Home Directory.
The following is an example of a relatively advanced config file. The one included with the initial installation is much simplified as settings depend on your local circumstances.
FF2-01 * FastFind II Configuration File start = w=124 First command. End on / to auto-activate fcmin = 5000 Estd minimum file count (50..50000 (approx)) originX = -532 Startup window x-origin (here: 532 from right!) originY = 14 Startup window y-origin (here: 14 pix from top) lines = 42 0, or 10.. Startup lines to display sound = * 0, 1, or Sound sample directory palette = *DarkBlue_thb 0..3 or file name buffer = 4096 1024..32766 Max search file buffer size history = 0 0 => Temporary, name => Permanent history list = ram1_list_lis Default list save file name sleep = button_sleep Language-dependent sleep name Actions = 8 Number of actions, below, on DOing a file * The following statement invokes Qmenu's VIEW_FILE ViewFile# * QD Thing and file. Both have same title, so only one will show on menu Open in QD# T# QD; \q \n80 \c100 \d<path> \f<fnm> \e<ext> \s<search> Open in QD# F# win2_sed_QD; \q \n80 \c100 \d<path> \f<fnm> \e<ext> \s<search> * This is for the Qpac2 Files Thing Open Dir# T# Files; '\O S \D <path> \S -T' * Another file selector (Find it at Knoware.no!) Open in FSEL# T# FSEL; /D<path> /F<fnm> /P2 Open in FSEL# F# win2_util_file_Fsel_obj; /D<path> /F<fnm> /P0 * This is for The Editor V3.07K Open in TED# F# win2_ed_TED: 10,-5,240,'r/<fnm>',10,-5,240,'f/<search>',10 * Finally, FileInfo2 FileInfo2# * End
FF2-XX This is the config file ID and version number. It must be the only item on the first line in the file start This is the startup command. It is supposed to contain a statement of the drives to scan, eg w=123 => initial scan of <win>1_, <win>2_, <win>3_, where <win> is whatever youve called your WIN drive. If the statement is followed by a / or \ the command will also be carried out immediately on start. Without the slash you get the chance to edit the line before pressing <ENTER> to execute it. fcmin Set your estimated minimum file count here. Suitable values will typically lie in the range 500..30000 Deafult 5000. You can adjust this value according to how you find yourself using FF2. If set too large, it can waste a lot of memory; too small and it could slow things down a little and lead to some memory fragmentation - again, depending on usage. You can check on heap memory by using the $ command (See Direct Commands, above) originX The startup window x-origin Possible values are: 0..<screen X size> => absolute pixel position -1 => current pointer position -2 => horizontally centred on screen other negative values => distance from right hand side of screen originY Startup window y-origin Possible values are: 0..<screen Y size> => absolute pixel position -1 => current pointer position -2 => vertically cantered on screen other negative values => distance from bottom of screen Note that if either originX or origenY is given as -1, both will be set to -1, ie the window will pop up at the current pointer position. lines Number of lines to display on startup. 0 => "optimal". For a 512x256 screen a maximum of 17 lines are possible. If you specify too many lines the program could crash. sound Sound settings Possible values are: 0 => sound off 1 => native BEEP * or directory => sampled sound directory. * => <home>rsc_ You can replace the two sound files with your own UB files. Just call them warn_ub and ok_ub. Or point to a different directory with two files thusly named. palette Palette setting Possible values are: 0..3 => inbuilt or user defined system palettes [*]<filename> => the name of a binary palette file (A THB file, currently all 114b in size.) Note: If the file you wish to use is in <home>rsc_ then you can use an asterisk in place of the directory name. In all other cases the full file name must be spelt out. Note: Some palettes will not display the information properly. Use the default palette, <home>thm_QPC2_thb as a guide/template. QPC2_thb was designed by M Kilgus. Note: In display mode 0 colours may be insufficient to display the information satisfactorily. buffer Search file buffer size Possible values are: 1024..32766 During content search the file is loaded into a buffer in memory. If the whole file doesn't fit, then a buffer load at the time is loaded. A bigger buffer is usually faster, but not all that much. The buffer is reserved at startup and maintained throughout the session, so a large buffer will take up a lot of memory while the program is running. history Command line history Possible values are: 0 => private history; disappears when you quit the program <name> => the history is retained between sessions (but doesn't survive a system reset). Note: History is not available natively in Qdos! Note: If you decide to give history a name it should be unique, eg FastFind2. However, multiple instances of the program will then all use the same history (if using the same config file or the same-named history). list Default list save file name Possible values are: <file name> - a valid, full file name sleep Button Sleep is a Qpac2 feature. Unfortunately it was thought a Good Idea to name various components in different languages. (Im glad that wasnt done with the S*BASIC source language!) Thus, if you have the German version of Qpac2 you need to enter Button_Schlaf here. AFAIK, all other languages use Button_Sleep. If you dont use Qpac2 (shame on you!) you can enter 'none' here. Actions The total number of actions on DOing a file Possible values are: 0..N
With Actions and the lines below, you are basically defining the menu that will be displayed when you DO (or right-click) a file name in the main display. The example given above is what my menu definition looks like. Since a lot of the information will be local to your system only a basic skeleton definition can be provided with the distribution.
Each action represents an external program and its command line parameters. This feature is mainly intended for viewing a selected file or directory. But no point re-inventing the wheel when you have FileInfo2! You could also just use FileInfo2 and skip this bit: Set Actions to 1 followed by the single line:
FileInfo2#
If you don't have, or wont use, FileInfo2, then set Actions to 0. You are then left with the dreadful internal file viewer. More of that below.
Any remarks you need to add must be put on a line of their own as no remarks can be added to the action line.
The syntax for a line of action programs is as follows:
<Title/Action># <Type># <Thing/Program> ; | : <Command line> Title/Action This is what will appear in the menu, eg View. Type T => Thing, F = File If the program is loaded as a Thing you specify that here. If the program is on disk mark it as F Note: You can have the same program specified as both a Thing and a File. If so, the Thing will be tried first and if that fails the program will be executed from file. However, to avoid having both the file version and Thing version appear in the menu, you can make the Titles identical on a subsequent line. That way only one will be listed, but both will be tried if the Thing is not available. (See the example given for QD, above). The action count must reflect the total number of actions listed, not just those to be displayed in the menu. Thing/Program If the external is a Thing, give its Thing name here otherwise spell out the full file name. Command line The command line can either be put on the program's stack, if the program supports it, or you can invent an elaborate sequence of keystrokes that will be stuffed into the program's keyboard queue. To put the command line on the program's stack use the semicolon ; after the Thing or File name followed by the command line itself. To stuff the command line into the program's keyboard queue use colon : after the Thing or File name followed by the command line itself. The command line does not have to be wrapped it quotes except where the program itself requires it. The whole string following the colon or semicolon is taken as is, as the command line.
The command line to be stuffed into the external's keyboard queue uses the Coded Digital String syntax. See Appendix A for details.
A negative integer, eg -5, will be interpreted as a pause/breather in a stuffed command line; it doesn't get passed on to the program. The numbers are in 50th seconds and can be from -1 and onwards. You may need to experiment to find suitable values, depending on your platform and the external program.
In the present implementation there are a few restrictions on the strings that can be stuffed into a program's command line.
You cant pass a literal negative number, such as -1, to the program; it will always be interpreted as a pause.
A pause marker cannot immediately be followed by another number, eg '..',-5,'240' wont work, although ..,-5,240 is ok, as the second 240 is a code, not a literal. However, codes that compute to literal numbers wont work as intended either, eg -7,45,55,.. will be interpreted as .. -7,-7, while ..,-5,48,.. will be seen as -50.
The following substitutions are made if they are encountered in the command line:
<path> - substituted for devN_dir_ <fnm> - substituted for devN_dirs_name_ext <dev> - substituted for devN_ <dir> - substituted for dir_ <ext> - substituted for _ext <name> - substituted for name <search> - substituted for the search string used on contents
The search string will often be blank, so take this into account when forming the command line: Not all programs will like empty search strings!
Some experimentation may be required to get these parameters right! You may crash both FastFind II and your external program a few times until you get it right! If you cant get it to work: stick with FileInfo2 instead!
Three special cases are permitted:
FileInfo2# - FileInfo2 FileView# - Qmenu's file viewer. Use this if you can rather than.. View# - TK2's file viewer - pretty grim stuff except when used from BASIC
One or more of these may appear between, above or below any lines for external programs. Their number must be added to the Actions count.
If you only want to use FileInfo2 then do:
Actions = 1 FileInfo2#
Then only the FileInfo2 menu will appear (where necessary. Eg if you have only defined one action for a given extension, no menu will appear; the action will be carried out immediately).
If you don't want any menu at all do:
Actions = 0
However the internal viewer, based on TK2's VIEW command will still be available. Note that this viewer truncates lines longer than the display width, and there is no ESCape from it until youve viewed the whole file(!)
You can also add it specifically to the menu with:
Actions .. .. View# ..
Yuck!
Please let me know if you find this program useful! (Or not!) Also let me know if you discover any bugs! Suggestions for improvements or added features welcome! (Although I cant promise to make them happen.)
The XSEARCH command included here is based on Simon Goodwin's DIY MSEARCH toolkit, Version 0.8, Copyright 1993,1994 Simon N Goodwin.
Edline% is also based on SNG's DIY EDLINE$ project, adapted for Minerva by Laurence Reeves, and somewhat tweaked and expanded by me, pjw.
The QHP toolkit is mainly Wolfgang Lenerz' work: User heap management toolkit v. 1.04 (c) W. Lenerz 2023.
Since work is still being done to expand these toolkits they are as yet unfinished, and the source code will probably only be made available when they are ready.
The remaining code and errors are my own. FastFind II is currently:
V0.01, pjw, 2024+
Conditions of use and DISCLAIMER as per Knoware.no
Appendix A ========== Coded digital string syntax --------------------------- This converts ASCII characters and numbers into bytes. Search string = item, below. Remember spaces and quotes are significant and must be quoted if they are to be part of the string. An unquoted <space> or the end of line terminates the string. item = string | code {delimiter + item} string = [<start quote>] + ASCII characters + [<end quote>] code = $ + $digit [$digit] | % + %digit {%digit}*7 | digit {digit}*2 quote = "'" | '"' AND <start quote> = <end quote> delimiter = , | <SPACE> | <end-of-string> $digit = {0..9,A..F,a..f} %digit = {0..1} digit = {0..9} Note that <SPACE> is treated as a space inside quoted strings and as a delimiter outside them Appendix B ========== Syntax of WIRX (V0.24) ---------------------- A wild card pattern is a string containing a mixture characters and wild- card codes, together with some help codes/commands. A pattern can contain any ASCII code (0..255) and can match (almost) any ASCII code, not only printable ones. Matches may be done on a case-sensitive ("A" = "A") or case-insensitive mode ("A" = "A" and "A = "a"). The QL foreign character set is supported with the correct interpretation of case (one hopes). The following wildcard characters may be used: '*' will match any number of characters, including none at all '?' will match any one character (0..255) '%' will match any one (decimal) digits (ASCII 48..57) '$' will match any one hex digit (always non-case sensitive) '#' will match one or more decimal digits (ie an integer) In addition there are some help codes: '-' is NOT => the result is flipped. Any match returns FALSE while a mismatch returns TRUE. '-' needs to be the very first character of a pattern string, ie before '!' (see next). Subsequent use of this character in the pattern string is considered literal, so no need to cancel. '!' as the first pattern character => case sensitive match. There is no need to cancel subsequent uses on this character (see next). It applies to the whole string and cannot be switched on or off for a particular section (see below). '/' is the cancel character. It converts the characters above, including itself, to its literal equivalent. '&' + code inserts the character corresponding to the code into the pattern string: '&65' => 'A', or '&$41' => 'A'. Note: These characters will be converted to lowercase in case- insensitive comparisons! Note: The current version does not differentiate between codes < 9, eg chr(5) will match chrs(0..8) ';' splits the pattern into two or more sections, each forming an alternative pattern. The comparison will return with the first section that matches, or when the list is exhausted. Note: you cannot have two consecutive ';'s, ie a;;c is illegal; a;b;c is fine. No syntax errors are reported, so Rubbish In => Rubbish Out, or RIRO Examples: (All quotes are in aid of illustration only) pattern matches ------- ------- "*" anything and everything "????" any four-character string "????*" any string with at least four characters "abc" "abc" or "ABC" "abc*" any string starting with "abc" or "ABC" "*ing" any string ending on "ing" "*test*" "Test", "test", "TESTING", "untested", .. "fr??nd" Ideal if you cant spell "friend" "!" matches nothing at all "!ABC" "ABC" but not "abc" "!A*" any string starting with capital "A" "!end!" Matches "end!" but not "END!" "!end/!" Matches "end!" but not "END!" "/!end!" Matches "!end!", "!END!", .. "!/Abc" "Abc" not "ABC" nor "abc" (syntactically incorrect) "/!" "!" "+//-" "+/-" "+/-" "+-" "Test/?" "test?", "TEST?", "Test?", .. "%%%%" any four digits (ascii 48..57) "$$$$" any four hex digits (ascii 48..57, 41..46, 61..66) "!$$$$" as above "#" any (positive) integer "-#" any negative integer "*#" any string ending on positive or negative integer "*#*" any string including positive or negative integers "abc,#" "abc,123", "ABC,1" but not "abc,-1" "abc,/$$$" "abc,$1F", "ABC,$C0", .. "!abc,/$$$" "abc,$1F", "abc,$6b", .. but not "ABC,$1F" "&65bc" "abc", "ABC", etc "!&$41" "ABC", "Abc" but not "abc" "ab&993" "abc3",.. "ab&00099" "abc" ! "ab&000990" "abc0" ! "ab&0/99" "'ab',0,'99'" = $6162003939 "ab&$FFF" "'ab',255,'f'" = $6162FF66 "ab&$f/ff" "'ab',15,'ff'" = $61620F6666 "abc&" "abc" ! - & ignored "a&bc" "abc" ! - & ignored "&$abc" "?c" = $AB63 and "?c" = $8B63 "&4" '0' and '1' and '2' .. '8'! This is a feature! "abc;efg" "abc", "efg" "abc;" "" (invalid syntax) "a;b;c" "a" or "b" or "c" or "A" or "B" or "C" "!abc;efg" "abc" or "efg" or "EFG" but not "ABC" "abc;!EFG" "abc" or "ABC" or "EFG" ";abc;def" "" or "abc" or "def".. "abc;def;" "" or "abc" or "def".. "abc;;def" "abc" or "def" bot not ""! "-abc" matches "cde" and "efg" but not "abc" "-" not nothing - matches anything bar nul "-*" doesn't match anything at all! "-?*" matches anything that is not nothing "/-#" matches any negative integer