SRD Sort Directory Utility P ROGRAM DESCRIPTION ------- ----------- SRD is an RSX-11D utility allowing a UFD to be sorted into order and listed. The format of default listing is su ch that it can be easily edited to create an indirect file for PIP, for example, to copy the files. The default order on the files is to sort on the extension field first, then by name. The name swi tch, "/NAME" causes the sort to be done by name first. The format of the command line is: [OUTFILE=] [UICSPEC] [/SWIT CHES] Responding to the "SRD>" prompt with a null line cau ses the current UFD to be listed, ordered on extension first, to "TI:". The "OUTFILE" is any file specification in stand ard RSX format. The defaults that apply if an output is specified are: SY0: DIRECTORY.LST;0 If no output file specification is given, the default is "TI:". "UICSPEC" is the Device and UIC portion of the standar d file specification. Wild cards are not permitted. E xample: LP:=[100,100]/NA Lists the directory of SY0: [100,100] in order by name on the line printer. SRD PAGE 2 Sort Directory Utili ty OPTIONS ------- There are a group of switches that allow selection of only certain files from the directory. 1. SELECT VERSION: /SV This switch restric ts the listing of file names to only the highest version . 2.DATE: /DA[:DD-MMM-YY] This swi tch allows selection of files created on the specifie d day. If no date is specified, the current date is used. There are two subswitches that may be used for date se- lection. They are: BEFORE: /BE [:DD-MMM-YY] AFTER: /AF [: DD-MMM-YY] When one of these options is used, the listing incl udes files created before or after the specified date as well as those created on the specified date. 3. SELECT--/SE: NAME.EXT This switch allows file names to be selected based on a sub-set string match with wild-card char- acters. The selection is satisfied if the end of the target field is reached without finding a character that does not ma tch. For example: /SE:M The select switch with only an "M" selects all f iles with "M" as the first character in the name. The "*" can be used for clarity and compatibility with PIP. SRD PAGE 3 Sort Directory Ut ility /SE:M???X.* This option would select any file with its name starting w ith "M", having any characters in the 2nd, 3rd and 4th positio ns, and "X" in the 5th po- sition. The "*" has the same eff ect as a null string-- it matches everything. A sub-switch to "SE" is "/NE" which causes the files selected to be those that do not match, i.e.: /SE:S/NE Selects all files that do not start with "S". Finally, switches are provided to aid in UFD mainte- nance. /SD--SELECTIVE DELETE This option causes SRD to read "TI:" and examine the first character to check for a "Y". If one is entered, SRD deletes the f ile whose name was just listed. Any other res- ponse causes SRD to proceed without deleting the file. All the previously specified opti ons for selection may be used, eg: SRD./DA/SE:MAK/SD Causes SRD to select all the files cre ated on the cur- rent date with the first three characters in the na me "MAK". These files are listed for selective deletion. The sub-switch /DE may be applied to /SD to cause SRD to go a head and delete all selected files after listing. If the listing is not desired, the /-LI switch can be applied. One additional sw itch can be applied to any of the above. That is the full listi ng switch, /FU [:n] This causes the additional listing of: 1. Creation date an d time 2. File size - used and allocated 3. File I.D. 4. Owner UIC 5. Protec tion SRD PAGE 4 Sort Directory Utility One final option is provided. This causes SRD to write the directory back in the order specified. This switch not only orders the directory, but also compresses it. This re- duces search time by FCP if the directory has had a lot of files deleted. eg: SRD>[100,100]/-LI/WB/ NA Causes SRD to read directory [100,100], sort it, then write it back without generating a listing. Write Access to the directory is required, and a Write Failure is usually due to a protection violation.