APPLICATION NOTE #171 PRINTING A SET OF FILES Rev. 01 Related files: PRINTD.PGM This application note describes two ways you can print a group of files, such as the contents of an entire disk. One method uses XPL (XyWrite Programming Language) and the other uses chain printing on an edited directory of the files. Note: Printer Files. Both methods assume that all the files on the disk use the same printer file and that the correct printer file is loaded. USING A PROGRAM PRINTD.PGM is a program that lets you print the contents of an entire disk. PRINTD.PGM is available on the disk that accompanies this application note. To use PRINTD.PGM: 1. Display a directory of the disk you want to print. For example: Type: F5dir a: 2. Edit the directory so that it only contains a list of the files you want to print. For example, remove the top two lines that identify the directory (if XyWrite displays them in your directories), any lines that identify other subdirectories, and any lines that identify files you do not want to print. 3. Run PRINTD.PGM. Type: F5run printd.pgm The program positions the cursor on the first line in the directory and executes the TYPE command. When the first file is printed, PRINTD.PGM moves the cursor down and executes the TYPE command again for the second file. The program continues until all the files on the disk have been printed and then displays the message, "All files printed." The program assumes that there is a directory displayed on the screen. If there isn't, PRINTD.PGM stops and displays the message, "No directory listing. Program halted." If PRINTD.PGM receives an error message after executing the TYPE command, it stops and displays the message, "All files printed." USING CHAIN PRINTING The following procedure prints all the files on a disk by editing the list of files on the disk, creating a parent file, and using the TYPE @ command to chain print the files. 1. Display a directory of the disk you want to print. For example: Type: F5dir a: 2. Edit the directory so that it only contains a list of the files you want to print. For example, remove the top two lines that identify the directory; the size, date and time columns of the directory; and the last two lines that summarize the total number of files and characters. 3. Change all the multiple spaces in the directory to single spaces. Press: Ctrl Home Type: F5ci /SpaceSpace/Space/ When XyWrite displays the message, "Done," press F9 until XyWrite displays the message, "Not Found." 4. Change the spaces that separate filenames and extensions to periods. Type: F5ci /Space/./ 5. Make sure any filenames without extensions do not end with a period. Type: F5ci /.Ctrl /Ctrl / 6. Store the edited list as a file on the disk you want to print. For example: Type: F5store a:epic 7. Set the drive that contains the disk you want to print as the default drive. For example: Type: F5a: 8. Use the parent file you created in Step 6 to chain print the files: Type: F5type @epic Result: XyWrite prints all the files listed in the parent file which should be all the files on the disk.