home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
- P A T R I Q U I N ' S
-
- PSEARCH - File Find and Text Search Utility
-
-
- by
-
-
- Norm J. Patriquin
-
-
- Version 3.8
-
-
-
-
-
-
- User's Guide
-
-
-
-
-
-
-
-
-
-
-
-
- March 13, 1988
-
-
-
-
- Copyright 1986, 1987 by Norm Patriquin
-
- Table of Contents
-
-
-
- PSEARCH -- Search for filenames on disk or text within files. . . . . 1
- Starting PSEARCH . . . . . . . . . . . . . . . . . . . . . . . . . 2
- Recommended Implementation . . . . . . . . . . . . . . . . . . . . 2
- Command Parameters . . . . . . . . . . . . . . . . . . . . . . . . 2
- Specification of default parameters . . . . . . . . . . . . . . . 8
- Function Key Usage . . . . . . . . . . . . . . . . . . . . . . . . 8
- Screen colors and monitor support . . . . . . . . . . . . . . . . 9
- Pausing the Search . . . . . . . . . . . . . . . . . . . . . . . . 9
- Batch Command File Examples . . . . . . . . . . . . . . . . . . . 9
- Bonus features for registered users . . . . . . . . . . . . . . . 10
- Overview of new features . . . . . . . . . . . . . . . . . . . . . 11
-
- Registering The Utilities . . . . . . . . . . . . . . . . . . . . . . . 13
-
- PSEARCH 3.8 Registration . . . . . . . . . . . . . . . . . . . . . . . 14
-
- Reporting Problems . . . . . . . . . . . . . . . . . . . . . . . . . . 15
-
-
-
- PSEARCH -- Search for filenames on disk or text within files.
-
-
- PSEARCH is a generalized search facility for all PC users. PSEARCH can
- search the current directory or all directories of an hard disk for files
- or text in files. It also can scan non-text files and show only the text
- (readable) data from the file. PSEARCH is not just another search type
- command. It works with normal DOS command parameters or with menus. This
- ensures that PSEARCH can be used by anyone that uses a PC.
-
- PSEARCH goes much farther than just searching for data. Once files are
- found, you can include file names in DOS commands which can either be
- executed or placed in command files. This turns PSEARCH into a very useful
- utility that can aid in many different situations. For instance, if you
- want to print a selected group of files based on how old they are, you can
- issue a print command for each file using PSEARCH. Any DOS command may be
- built. The only limit to the use of this facility is your imagination.
-
- Another of the most popular features of PSEARCH is the ability to peak into
- files and show the first readable data in a file. One of the best uses of
- this is for 123 users who have forgotten the name of a work sheet file they
- previously created. When users have a great number of work sheet files, it
- is prohibitive to load and inspect each one, but PSEARCH can quickly find
- the work sheet desired. You optionally specify a word or words to look for
- in .WKS files and then have PSEARCH locate any files containing those
- words. PSEARCH will show you a line containing the first text found in the
- file. This is often the title line of the work sheet file. It will allow
- you to determine if it is the file you want. If you need to examine more
- text, press a key and it will be displayed.
-
- Here are a list of some of the many possible uses for PSEARCH.
-
- ** List all files on a hard disk that match a wildcard
- specification.
-
- ** Show the names of any files containing specified text
-
- ** Show text lines of any file containing a specified string.
-
- ** Look for word "Mrs" in any file and preserve case in search.
-
- ** Find 123 files containing the word "BUDGET" and print their name.
-
- ** Find 123 files with word "BUDGET" and show first text data in
- file.
-
- ** Compile all C programs that refer to the "RECDESC.H" include
- file.
-
- ** Find a word processing document containing the name "Wiffle".
-
- 1
- ** Delete any *.DOC files containing "To: Mr. Johnson".
-
- ** Locate all readonly files existing on a disk.
-
- ** Use the ARC utility to archive any *.DOC file over n days old.
-
- ** List all files updated today.
-
- ** Build a DOS command to archive manually selected files from one
- or more directories.
-
- ** Search multiple drives attached to the system for text or a file
- name
-
- ** Search for a file name even if it has been archived with the ARC
- utility and exists in a .ARC file.
-
- ** Extract lines found in a file to another extract file
-
- ** Limit text search to WORDS, PREFIXES, or SUFFIXES. This greatly
- enhances the search by returning only the data you want.
-
- ** Ability to exclude COM and EXE files from text searches greatly
- reduces the time required to find data.
-
-
- Starting PSEARCH
-
- To start PSEARCH using menus, just enter the command "PS" without any
- parameters. A menu will be provided to guide you along. To use PSEARCH in
- command mode you will need to learn the command parameters. These are
- described in this document, and in a online help display that is accessible
- through the menus.
-
-
- Recommended Implementation
-
- Although PSEARCH can be used with menus, it is easiest to use when you
- build DOS batch command files to accomplish your most often used search
- requests. Batch files can relieve you from keying in parameters over and
- over again, and will save you from having to remember all the parameters
- you need each time it is used.
-
-
- Command Parameters
-
- Since PSEARCH has so many different functions, there are many different
- command parameters. They are easy to understand and learn, and will give
- you the flexibility to get the work you need done. Remember that each
- parameter is summarized in the online help display. Just type PS.
-
-
- 2
- COMMAND FORMAT:
-
- PS [fspec] /T:text /F /S /E /A /D /M /C /P /PR /PF /MO /O:nn/N:nn
- /X[F][P]:cmd /AT:c /FW /FP /FS /DR:xxx /SO /AR /AO /FX
- /SK
-
-
- PS - PS is the name of the PSEARCH command.
- PS actually refers to Patriquin's PSEARCH. Enter the command without
- any parameters for menus and help.
-
- [fspec] Enter the DOS file specification for the directory and file
- names to be searched. If no directory name is specified the
- current directory will be searched. If the /A option is
- specified, the directory name portion of this parameter is
- not used.
-
- SPECIAL FILENAME SEARCHING CONTROL CHARACTERS
-
- The filename specification may contain a full DOS pathname
- including the standard DOS wildcard characters * and ?. In
- addition the special characters '~', '!', or ';' may be
- placed immediately before the filename to indicate special
- filename find criteria.
-
- ~ SOUNDEX -- Select any filename that sounds like the
- specified name
- ~WORD would select:
- WORD WOOORD WRD WOOD WORLD
-
- ; NOVOWEL -- Select equal filenames but ignore vowels
- AEIOU in name
-
- !WOORD would select:
- WoRD WoooRD WieRD WRD
-
- ! CHARS -- Select any filenames that contain the
- characters entered
- !WD would select:
- WorD.dat WilDone.dat lstWorD.x
-
-
- /A All directories - Indicates that all directories on the
- current drive are to be searched. If not specified, only the
- current or specified directory is searched.
-
-
- /AO Archive Only - Like /AR except at only filenames with the
- DOS .ARC extension are processed. All non archive files are
- bypassed.
-
-
- 3
- /AR ARchive - If you use the ARC utility distributed by System
- Enhancement Associates, this parameter will allow you to
- find file names even if they have been archived and exist in
- an archive file.
-
- When /AR is specified and a file with the .ARC extension is
- found, the filenames contained in it are searched for
- matches. /AR only pertains to file name searches (/F
- parameter).
-
-
- /AT:c ATtributes - Only selects files that have the indicated
- attributes. Indicate one of the following attributes as the
- c value for the parameter.
-
- U - Updated,the ARCHIVE bit is on to indicate the file has
- been updated since the last backup.
-
- R - Readonly,Files marked with Readonly attribute.
-
- H - Hidden,Files marked with Hidden attribute.
-
- S - System, Files marked with System attribute.
-
-
- /C Case - Indicates that text search requests are to be case
- sensitive.
-
-
- /D Data - For text searches only. Causes the text that
- matched the search to be shown on the screen. If a text
- file is being searched, the screen line displayed will show
- the line number of the text in the file and the offset into
- the file where it exists. If it is not a text file, only
- the offset from the beginning of the file will be shown.
-
-
- /DR: DRive list. If the drive is not specified, text will be
- located on the current disk. /DR: indicates one or more
- drives that the search is to be performed on. The following
- example indicates the search is to be done on drives A and
- D.
-
- /DR:ad
-
-
- /E dirEctory - List all directories on the current drive.
-
-
-
-
-
- 4
- /F Files - This parameter indicates the type of search being
- done. If /F is specified, PS assumes that a locate for file
- request is being entered. If not specified, a text search
- is assumed and the /T parameter must be supplied.
-
- /FP Find Prefix - Like find word, Find Prefix will only select
- the text specified if it is found on the beginning of a
- word.
-
-
- /FS Find Suffix - Like find word, Find Suffix will only select
- the text specified if it is found at the end of a word.
-
-
- /FW Find Word - The text to be searched for is a word. Only
- select text that is a complete word. A word is defined as
- any string of characters and numbers that is not preceded or
- succeeded with other characters or numbers.
-
- In "This", "This" is a word. "is" is not a word.
-
-
- /FX File Extract - All lines found to contain the matching text
- are to be extracted to an output text file. The name of the
- file is assigned by PSEARCH and it will be displayed at the
- end of the search.
-
-
- /M Multiples - For text searches only (/T:). Indicates
- multiple matching text lines are to be displayed from each
- file. When /M is not specified, only the first occurrence
- of the text in the file will be shown. This is only valid
- if the /D parameter is also specified.
-
-
- /MO MOre - Stops screen scrolling when the end of each screen
- page is reached.
-
-
- /N:nnn Newdays - Indicates that only files created or updated
- within the last nnn days are to be selected for processing.
- /N:1 causes any files updated within the last day to be
- selected. To search for files updated on the current date,
- specify /N:0.
-
-
- /O:nnn Olddays - Indicates that only files older than nnn days are
- to be selected for processing. /O:365 will cause files over
- one year old to be selected.
-
-
-
- 5
- /P Pause - Pause has different meanings depending on other
- parameters that are specified.
- For File locate commands, PS will pause whenever a matching
- filename is found. You may terminate the search or continue
- by pressing any key.
-
- When the peek at file text request is active (/S), PAUSE
- indicates to stop after each line of text is displayed. You
- may then request that another line of text from the file be
- displayed or to go on to the next file.
-
-
- /PF Print to File - If you want to direct print to an output
- file, enter /PR. The file PSPRINT.DAT will be created in
- the current directory.
-
-
- /PR PRint - Causes all screen output to also be directed to the
- output printer device.
-
-
- /S Scan - Peek into selected files and show the text found.
- After a file has been selected because it contains found
- text word or it matches specified filename pattern, PSEARCH
- will scan the file from the beginning for text information.
- This information will be shown on the screen one line at a
- time.
-
- If the /P parameter is also specified, you may see more than
- one line of the text from the file by pressing a key.
-
-
- /SK FIles with .COM and .EXE extensions are to be excluded from
- text search operations.
-
-
- /SO Turns the sound off at the beginning of a PSEARCH execution.
- It may be turned back on at any time by using the sound
- function key.
-
-
- /T:text Text - Specifies the text to be found for text search
- requests. The text string may contain any characters. A
- terminating command line or the following slash character
- will signal the end of the text to be searched. If this is
- the last parameter on the command any trailing spaces will
- not be included in the search. To include trailing spaces,
- terminate the string with an ending slash character.
-
- Text may be specified in upper or lower case. Unless the /C
-
-
- 6
- parameter is specified to force exact text matches, the
- search will be made for any match regardless of case.
- You may specify a wildcard value of ? in any text word.
- This has the same use as if it were specified in a DOS
- filename. Any character will match this character. For
- example, /T:01-??-87 would match any date from 01-01-87 to
- 01-31-87. (Special thanks to George Timmer for suggesting
- this feature.)
-
- Strings may also be single or double quoted. This allows
- for special characters to be included in the search string
- such as / characters.
-
- Examples:
-
- /T:BUDGET /T:Budget /T:Mr. Jones/
- /T:"01/01/88"
-
- Note, to include a trailing space as part of search text,
- you must follow search text by another / command parameter.
- For example:
-
- PS *.C/T: SMITH /D/M
-
-
- /W Wordstar 7 bit file is being searched. This option adjusts
- PSEARCH to be compatible with the special format of Wordstar
- files.
-
-
- /X:xxx eXecute - Build and execute a DOS command whenever a
- filename match or a text match is found. xxx is the DOS
- command to be executed.
-
- The command may either be a standard DOS command or the name
- of a DOS batch command file. The command will be executed
- with a second copy of COMMAND.COM. The command data may
- contain the following special characters to allow for
- substitution values.
-
- # - Always replaced with the selected filename
-
- & - Always replaced with the selected path/filename
-
- ! - Always replaced with the filename without extension
-
- @ - Replaced with a slash to allow for command parameters to
- be specified in executed commands.
-
- Examples:
-
-
- 7
- /X:ERASE &To delete selected files
- /X:ARC A OLD123.ARC # To use ARC utility to archive
- file
- /X:TYPE & To type the file
- /X:LOTUS Start 123 for the file
-
- /XF:xxx eXecute File - Works like /X except that the command is not
- executed, it is generated and placed in a DOS batch command
- file named PSCMDS.BAT in the current directory. This file
- may be edited before it is executed.
-
-
- /XP:xxx eXecute with Pause - Functions in the same way as the /X
- parameter except that you are asked to indicate if the
- command is to be executed for each selected file.
-
-
- Specification of default parameters
-
- Default parameters are parameters that do not need to be
- specified each time PSEARCH is started. Any PSEARCH parameter
- may be specified as a default parameter.
-
- Use the DOS SET command to specify the parameter name and
- contents to be used by PSEARCH each time it is started. The
- following example indicates that text search is always to assume
- /d and /m are specified:
-
- SET PS=/D/M
-
- Once this DOS command is issued, each subsequent use of PSEARCH
- will operate as if these parameters have been specified on the
- command line. The SET command is most commonly placed in the
- AUTOEXEC.BAT file so it may be in effect every time your machine
- is started.
-
-
- Function Key Usage
-
- F1 - Brings up a simple help display to show the use of other function
- keys.
-
- F3 - Toggle sound on/off. If a beep is sounded when the key is
- pressed the sound has been turned on. If there is no beep, the
- sound has been turned off.
-
- F4 - Execute a DOS command. Pressing this key will clear the screen
- and allow you to enter a DOS command. The command will be
- executed from within another version of DOS COMMAND.COM. It may
- be the name of a DOS batch command file. After the command is
- executed you may return to activate the search at the point it
-
- 8
- was stopped. The screen will be restored to its original
- contents.
-
- Screen colors and monitor support
-
- PSEARCH checks the DOS equipment flags to determine what type of monitor
- you have on your system. This is usually always correct except for one
- specific information. For those users running a composite monitor with a
- color graphics card, the screens may not be displayed correctly. If this
- occurs, use the DOS MODE command to set your environment to black and
- white. This can be done at system startup or just before starting PSEARCH.
- Beware that some applications incorrectly reset these indicators and they
- may need to be reset before again running PSEARCH. Following is an
- example, see the DOS reference for more information about setting the
- monitor with the MODE command.
-
- MODE BW80
-
-
- Pausing the Search
-
- Even if Pause parameters are not specified, you may pause the search at any
- time by pressing any keyboard key. At the end of the next file processing
- will pause. You will then have the opportunity to continue processing, use
- a function key, or exit from PSEARCH.
-
-
- Batch Command File Examples
-
- Following are examples of batch files that may be used to invoke PSEARCH.
-
- 1. PSFF - Find a file on the current hard disk. Stop screen from
- scrolling past the end.
-
- echo off
- PS %1/f/mo/a
-
- To execute enter: PSFF filename
-
-
- 2. PSFIND - Find any file on the disk containing the specified
- characters and show the matching data.
-
- echo off
- PS *.*/t:%1/d/m/mo/a
-
- To execute enter: PSFIND text
-
-
- 3. PS123 - To locate any .WKS files in the 123 directory that
- contain the text specified. Show the first line of
-
- 9
- text data found in the file. Optionally allows you to
- show additional lines of data.
- echo off
- PS \123\*.WKS/T:%1/S/P
-
- Note: Replace the \123\ with the name of the directory
- you desire to search in.
-
- To execute, enter: PS123 text
-
-
- 4. PSSELECT - Manually select files to be processed with the
- entered command.
-
- echo off
- PS %1/f/xp:%2 #
-
- To execute enter: PSSELECT fspec command skeleton
-
-
- Bonus features for registered users
-
- To encourage users to register PSEARCH, the following sections of this
- utility are made available only to registered users. Once you have entered
- your registration information, the bonus functions will become available
- for use.
-
- /PR - Direct display output to the line printer
- /PF - Direct display output to a print file
- /SO - Turn off the sound
- /SK - Ignore COM and EXE files for text searches
- /FX - Extract text search lines to a file
- /DR: - Multiple drive support is limited to 2 drives
-
- If you cannot afford to register and need a bonus feature, or just don't
- feel it is worth the amount asked, send me a letter describing your
- situation and I will register you. If you are unable to pay, please
- include a self addressed, stamped, envelope so I may return your
- registration information.
-
-
-
-
-
-
-
-
-
-
-
-
-
- 10
- Overview of new features
-
- There is an ongoing commitment to improve PSEARCH as long as there is
- expressed need by PSEARCH users. I do respond to your requests. The
- enhancements below reflect both user requests and my own ideas. Please let
- me know of your needs, maybe they can appear on this list next time.
-
- -----------------------------------------------------------------
-
- PSEARCH Version 1.0 was released in March 1st, 1986
-
-
- PSEARCH Version 2.0 was released April 8th, 1986. It upgraded version
- 1 with the following new features.
-
- -- Ability to search in .ARC files for filenames /AR /AO
- -- Find text by WORD, PREFIX, or SUFFIX /FW /FP /FS
- -- Returns back to menus after search is complete
- -- Extract data to file implemented
- -- Fix to show found text un upper/lower case
- -- /SO to turn sound off
- -- Ability to exclude .COM and .EXE files from search
- -- Ability to search all drives attached to system /DR:abc
-
-
- PSEARCH Version 3.0 was released Sept. 7th, 1986. It upgraded
- version 2 with the following new features.
-
- -- Sound alike and other new filespec wildcards (! ; ~).
- -- More menu options on the Peak menu.
- -- Correction to retrieve proper environment string to be used
- when executing DOS commands.
-
-
- PSEARCH Version 3.3 July 5, 1987
-
- -- Change registration so there is no longer a need to have the
- PSEARCH.REG file exist in the root directory.
-
- -- Text searches will not attempt to search .ARC files. Since
- these files are compressed it makes no sense to search them
- for text.
-
- -- Correct Peek menu screen spelling and menu item numbers
-
- -- Use environment field PS= to specify default command
- parameters.
-
-
-
-
-
- 11
- PSEARCH Version 3.4 September 16, 1987
- -- Allow ? as text search pattern character. This means that
- searching for a ? character is not valid but gives you
- greater flexibility in searching for variable text. See
- description of the /T:xxx parameter for specific details.
-
- -- Ignore ~ ! and ; filename search characters unless they are
- in the first position of the filename. Previous versions
- file searches would fail if these characters were found in
- any position but the first.
-
- -- Correct filename matching. If file XXX would not be found
- if pattern name of XXX.* was specified.
-
- -- When print option was used with menus, when processing
- completed, menu text was printed to the printer. Corrected.
-
-
- PSEARCH Version 3.8 March 1, 1988
-
- -- Add /W parameter to accept 7 bit wordstar file format for
- text searches.
-
- -- Add ability to accept " or ' quoted strings in text search
- input command data. This is for the /T: parameter only.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 12
- Registering The Utilities
-
- All utilities are distributed under the Shareware concept. This makes them
- available for anyone to try without obligation. If you decide one is
- useful and want to keep it, I ask that you register your use of it. This
- will allow for continued support and maintenance of the program and will
- help to encourage that more quality software be made available through this
- channel. We ask all corporate and government users of utilities register
- their copies.
-
- The form on the following page indicates registration costs and may be used
- to register any or all of the utilities.
-
- Send registration requests to:
-
- Norm Patriquin
- P.O. Box 8263
- San Bernardino, CA 92412
-
-
- The registration charge is a one time fee that entitles you to all future
- versions of the product. These may either be obtained from normal
- Shareware sources or directly from me. Any organization ordering more than
- 100 copies is also entitled to telephone support and will be given the
- technical support number.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 13
- PSEARCH 3.8 Registration
- Please register the following utilities. I have enclosed the fees as
- marked below.
-
- _____ PALERT........................................ $15.00
- _____ PATTR......................................... $10.00
- _____ PCOPY & PMOVE................................. $15.00
- _____ PDAILY........................................ $10.00
- _____ PDELETE....................................... $15.00
- _____ PPRINT........................................ $15.00
- _____ PSEARCH....................................... $15.00
- _____ PTOUCH........................................ No Charge
-
- _____ Users Guide for all utilities and disk........
- (Does not include registration) $15.00
-
- _____ Registration of all Patriquin Utilities with
- program disk and User's Guide.............. $45.00
-
- _____ Update of newest Patriquin Utility disk with
- manual. ................................... $15.00
-
- _____ Disk source for all utilities. This does not
- include source for other vendors C tools
- packages used for development.................. $200.00
-
- ****************************************************************
-
- Name: ________________________________________________________
-
- Company: _____________________________________________________
-
- Address: ______________________________________________________
-
- ______________________________________________________
-
- City: __________________________ State: ________ Zip: ________
-
- I learned about the utilities from: ____________________________
-
- If BBS indicate name and number please._________________________
-
- ____________________________________________________
-
- Please register the software under the following name:
-
- ____________________________________________________
-
- Send to: Norm Patriquin
- P.O. Box 8263
- San Bernardino, CA 92412
-
- 14
- Reporting Problems
- I welcome all comments or enhancement suggestions. Please document each
- item clearly and provide printed examples if possible. Please be sure to
- include this form with all requests, it will help to make sure we can
- provide you with the best possible service.
-
-
- Name: _______________________________________________________
-
- Company: ____________________________________________________
-
- Address: _________________________________________________
-
- ______________________________________________________
-
- City: __________________________________ State: _______________
-
- Zip: ______________________________
-
- Telephone: _______ / ________________________ (Home / Work)
-
-
- Date: _________________________
-
-
- Name of Utility: _______________________________________________
-
- Description of problem or enhancement:
-
- ____________________________________________________________
-
- ____________________________________________________________
-
- ____________________________________________________________
-
- ____________________________________________________________
-
- Suggested solution:
-
- ____________________________________________________________
-
- ____________________________________________________________
-
-
-
-
-
-
-
-
-
-
- 15
-
-