.RM+10 .F .TITLE FIND -- FIND FILES UTILITY .S 2 FIND is a VAX ODS-2 utility which allows searching of directories and subdirectories with wild characters, time constraints on files, and other features not available in PIP. An output file from FIND is easily edited and can be read by the command stream to make repititive runs with different files very easy. .s 2 The format of the command line is: .S 2 .NF FIND search-string Command Qualifiers Default /OUTPUT=[file-spec] FIND.LIS /HIGHVERSION[=n] 1 /BEFORE[=time] 00:00:00 on current day /AFTER[=time] 00:00:00 on current day /NOT .F .S3 Description .S 2 The FIND command searches the specified device (SYS$DISK is the default) for all entries which match the search string. The search string permits wild characters in both the directory name and in the file name. .S 2 Command Qualifiers .S 1 /OUTPUt Requests that the resulting output from the command be written to a file rather than the current SYS$OUTPUT device. .S 2 /AFTER=time .S 1 Requests only those files which were created after a specified time should be listed. The time format for both /AFTER and /BEFORE is DD-MMM-YYYY HH:MM:SS. To get all files after 2 PM on the current day use /AFTER=-- 14:00:00, notice that a space is required before the time. .S 2 /BEFORE=time .S 1 Requests only those files which were created before a specific time should be listed. The time format is the same as the /AFTER command. Note that /AFTER and /BEFORE can be used simultaneously to bracket a time period. .S 2 /HIGHVERSION=n .S 1 Reqests that only the highest n (default is 1) versions be listed. .S 2 /NOT .S 1 Request that only the files which do not match the name part of the search string are to be printed, all other qualifiers are in effect so /NOT will work with /HIGH and times. .S 4 A valid search string is of the form "DISK:[s-string.s-string.s-string]s-string.s-string;version" .S 1 where s-string is composed of the characters A-Z,0-9,?,_# or the wild card designator "*", with the following meaning. A character A-Z or 0-9 says that a match will only occur if that character position matches, with the "?" being a wild character (all characters match it). The "_#" character instructs the searching for all characters following it to start from the end of the string, so the s-string of "_#12" would match everything which ends with a "12". Also when searching directories, no search is made for matching directories unless a "*", "?" or "_#" appearing in the level, so [D_#.COM] would try to find all files in all directories which start with a "D" and have a subdirectory of COM, while [D.COM] would only examine [D.COM]. However in names and extensions "D.D" is the same as "D_#.D_#". The version may be a number of a "*" with the default being the "*", also an explicit version number overrides the /HIGHVERSION switch. .S 5 Examples .S 1 1. $MCR FIND Z .S 1 All files in the default directory which start with a Z will be listed. .S 2 2. $MCR FIND ?Z.X .S 2 All files in the default directory which have a Z as the second character and have an extension which begins with an X will be listed. .S 2 3. $MCR FIND Z_#X._#R .S 1 All files in the default directory which start with a Z end with an Z and have an extension which ends with an R will be listed. .S 2 4. $MCR FIND [.COM] .S 1 All files in the default directory in the subdirectory COM will be printed .S 2 5. $MCR FIND [.*] .S 1 All files in all first level subdirectories of the default directory will be listed. .S 2 6. $MCR FIND [D_#.*.OBJ]/AFTER/HIGH .S 1 The highest version of all files created after today in all directories which start with a D and have a sub-sub level of OBJ will be listed. .S 2 7. $MCR FIND D/NOT .S 1 All files which do not start with a D in the default directory will be listed.