DESCRIPTION OF THE PROGRAM "RDIR" --------------------------------- RDIR is a program that reads the directory segments of a device or file and shows them in an ASCII formatted list. With RDIR, the directory can also be patched. It determines the number of segments by reading this number from the header of the first directory segment, so if this segment is fault, errors may occur. Errors may also occur when the header of a segment contains wrong data. RDIR uses the CSI in special mode for input. When no output device or file is specified, output goes to TT:, the default extension is .DIR for output files and .DSK for input files. OPTIONS on input: /S:n : indicate number of first segment to be read /E:n : indicate number of last segment to be read /H : list until highest segment currently in use /P : patch directory entries When no options are used all directory segments are listed. When a directory entry is to be patched, the filename, statusword, file length and creation date can be changed. All data of the segment headers can also be patched. When in patch mode, the following prompts occur first: PROMPT INPUT Segment nr. ? nn (segment number to be patched) Entry nr. ? nn (entry number to be patched, segment header = 0) When patching the header the following prompts occur, showing old values: Number of segments: nn > Next segment: nn > High segment: nn > Extra bytes: nn > Start block: nnnnn > When patching an entry the following prompts occur, showing the old data: Filename: XXXXXX.XXX > Status: SSSSS > Length: nnn > Date: nn-nn-nn > For these prompts the following input is valid: : no patch performed nnnnn : new numeric value XXXXXX.XXX : new filename (enter "." to clear the name) SSSSS : new status (permanent/protected/tentative/empty/end) nn-nn-nn : new creation date (enter "0" to clear the date) * : new creation date = current system date ^ : go back to previous entry $ : go back to first prompt (= Segment nr. ? ) # : leave patch mode After patching an entry, the next entry is opened for patching, so the entire directory can be patched sequentially. When the last entry of a segment is incomplete (usually entry nr. 73), the status of that entry has to be "end of segment". If this is not so, RDIR displays the current status and prompts to set it to "END". Type "YES" to set the correct status. If the status is correct, this entry is skipped during patch mode. The listing of output can be stopped by typing ^Z (control-Z), RDIR then prompts for new input. Input can be taken from a file by typing @DEV:FILNAM.EXT after the * prompt, this can be usefull when a large part of the directory has to be patched with known data. Commandfile execution is stopped when ^Z is typed or when an end-of-file is detected. See RT11 manual 3B (SSM) chapter 9 for detailed information on the structure of the directory. The output of RDIR is exactly conform this structure, the only difference is that RDIR lists an ASCII formatted output and RDIR includes the starting block number of each file. (c) H.Reints, 1983,1984