home *** CD-ROM | disk | FTP | other *** search
- Title: FileMatch
- Purpose: Intelligent File Finding
- Author: © Sanjay Pattni 1989-1996
- Version: 1.01 (20-03-96)
-
- ********************************************************************************
- * *
- * Licence *
- * ~~~~~~~ *
- * A personal licence is granted as follows: *
- * *
- * Definitions *
- * =========== *
- * Software: Software means all parts of FileMatch and it's resource *
- * files *
- * *
- * Conditions *
- * ========== *
- * *
- * This software is Copyright Sanjay Pattni 1989 - 1996. *
- * All rights reserved. *
- * *
- * (1) You may not incorporate any part of the software into any *
- * other programs. *
- * *
- * (2) You may not disassemble, reverse engineer, decompile or make *
- * any attempt to discover the source code of the software. *
- * *
- * (3) You may freely distribute this software if: *
- * (a) you do not make any profit from doing this. *
- * (b) you are a software library and you do not make a profit *
- * of more than 25% of the price that you charge. *
- * *
- * In all other circumstances you may distribute this software *
- * if, and only if, you have Sanjay Pattni's explicit permission *
- * to distribute this software. *
- * *
- * (4) All copies and installations of this software contain this *
- * file (unedited). *
- * *
- * (5) Ownership of this software remains with Sanjay Pattni at all *
- * times. *
- * *
- * (6) This software is provided with no explicit nor implicit *
- * warranty. Sanjay Pattni does not recommend its fitness for *
- * for any purpose. *
- * *
- * If you do not accept these licence conditions, you must delete all *
- * your copies of this software. *
- * *
- ********************************************************************************
-
-
- Abstract:
- =========
- FileMatch is an intelligent file finding utility. It will search a
- directory and try to match file characteristics according to a very
- extensive user specified template. The utility can be used directly
- from the command line or via a WIMP front end.
-
-
- Requirements:
- =============
- 1MByte or more memory.
-
- Risc OS 3 or above.
-
- Risc OS prior to 3.6 requires various Toolbox modules to be soft-loaded:
-
- Toolbox 1.36
- Window 1.31
- Menu 0.24
- Iconbar 1.12
- ProgInfo 0.09
-
- Note 1: They are only required by the WIMP based front end, ie. for pure
- command line usage, they are not needed.
- Note 2: They are not supplied with this distribution.
-
-
-
- Front end:
- ==========
- Run !FileMatch for a RISC OS compliant frontend to FileMatch.
- Use Interactive Help for instructions.
-
-
- Command Line Syntax:
- ====================
- FileMatch [flag options]^
-
-
- Flag Options:
- =============
- (Default is shown in brackets after description)
-
- -a <Access string>
- <Access string> is a string specifying what access attributes
- should be matched. The format is something like:
- "PlwR/wR"
- The characters to the left of the "/" are owner access attributes.
- The characters to the right of the "/" are public access attributes.
- An upper-case letter specifies that the attribute is ON. A lower-case
- letter specifies that the attribute is OFF. If the attribute is not
- present, it's state will not be matched.
- "P" = Privatised - used on SJ Research MDFS networks
- "L" = Locked
- "W" = Write Access
- "R" = Read Access
-
- -cs
- Make the wild card search name case sensitive. (default=OFF)
-
- -d < <min time[ <max time>]> | <relative time string> >
- Match date stamp or date stamp range or relative time range.
- Format of <min/max time> is five bytes of hex, eg. "1a2b3c4d5e"
- where the most significant byte is given first.
-
- A relative time string is used to specify a time range relative to
- the current time, eg. "thisday".
-
- There are 5 suffixes, ie. time units:
- "hour"
- "day"
- "week" My weeks start on a Monday!
- "month"
- "year"
-
- There are 3 prefixes:
- "this" = the current time unit
- "last" = the previous time unit
- "past" = current time - one time unit
- eg. the current time is 17:47
- "thishour" = 17:00:00.00 -> 17:59:59.59
- "lasthour" = 16:00:00.00 -> 16:59:59.59
- "pasthour" = 16:47:00.00 -> 17:46:59.59
-
- -e <min address>[ <max address>]
- Match execution address. See note [1], [2].
-
- -l <min address>[ <max address>]
- Match load address. See note [1], [2].
-
- -m <file>
- <file> specifies a file which is to used as a template. Note that
- this will override any preceding match parameters.
-
- -n <wildcarded name>
- <wildcarded name> specifies a wildcarded name to match (default="*")
- "#" = matches any single character
- "*" = matches 0 or more characters
-
- -o <value>
- Output: (Default = Output nothing)
- Bit 1 = Filename
- Bit 2 = File information
-
- -ot <object types>
- <object types> is integer specifying objects to match (default=1)
- Bit 0 = Files
- Bit 1 = Directories
- Bit 2 = Image Files
-
- -p <path>
- <path> specifies directory to start search from. (default=CSD)
-
- -r
- Recursively search directories (Default = OFF)
-
- -ri
- Recursively search image files (Default = OFF)
-
- -s <min size>[ <max size>]
- Match files of given size or size range. See note [1], [2].
-
- -t <filetype string>
- <filetype string> is filetype to match
-
- -v
- Verbose (Default = OFF)
-
- -x "<command>"
- Command to eXecute on matched files - very useful and also very
- dangerous if abused.
-
- Command Macros:
- "\p" = Path of file,
- "\n" = Name of file,
- "\\" = single "\"
-
-
- Examples:
- =========
- * List all files with date stamp of sometime today from CSD and below:
-
- FileMatch -o 1 -d thisday -r -ri
-
- * List all files and info on them for files with size of 2457 bytes
- exactly, in the CSD:
-
- FileMatch -o 3 -s 2457
-
- * List all files with size in the range 2457 +/- 100 bytes, in the CSD:
-
- FileMatch -o 1 -s 2457 ++100
-
- * List all files with load address in the range &3000 to &7fff
- inclusive, in the CSD:
-
- FileMatch -o 1 -l &3000 &7fff
-
-
- Notes:
- ======
- [1] For flags which allow a single value or a range, if a single value
- is given then a match will only occur if the file has exactly this
- value. For a range, a match will only occur if the file has a value
- in the _inclusive_ range given by min and max.
-
- [2] If an integer is expected for a flag such a described in [1], you
- may prefix the "max" value with the following modifiers:
- "+" : range_max = first parameter + second parameter
- "+-" : range_max = first parameter - second parameter
- "++" : range_min = first parameter - second parameter &
- range_max = first parameter + second parameter
- "&" : integer is specified in hexadecimal
-
- [3] Before starting to search FileMatch will read the CSD status.
- When searching, FileMatch will change the CSD. When FileMatch has
- finished searching it will restore the CSD to the original state.
- To avoid any possible problems occurring, do not change the CSD
- when FileMatch is running. Also, be careful of creating or deleting
- files whilst searching. This may confuse FileMatch and make it
- 'lose' it's place.
-
- [4] CSD = currently selected directory
-
- [5] In the above descriptions "file" is sometimes used generically to
- mean "files", "directories" or "image files". These places should
- be obvious.
-
- --
- ********************************************************************************
- * *
- * Contacting the author *
- * ~~~~~~~~~~~~~~~~~~~~~ *
- * *
- * Author: Sanjay Pattni *
- * Address: 105 Sterling Place London W5 4RD. *
- * Tel.: (+44) (0) 181 - 568 9167 *
- * Email: s.pattni@ic.ac.uk *
- * WWW: http://www.pp.ph.ic.ac.uk/~spattni/ *
- * *
- ********************************************************************************
-