PPPPP 44 44 PPPPP SSS PPPPPP 44 44 PPPPPP SSSSS PP PP 44 44 PP PP SS SS PP PP 44 44 PP PP SS PP PP 44 44 PP PP SS PPPPPP 4444444 PPPPPP SSSSS PPPPP 4444444 PPPPP SSSSS PP 44 PP SS PP 44 PP SS PP 44 PP SS SS PP 44 PP SSSSS PP 44 PP SSS "Print for PostScript" Version 1.10 of June 1991 Robert K. Blaine / ECONO-SOFT P.O. Box 181030 Austin, TX 78718-1030 800-367-7590, 512-832-1675 CompuServe [73267,1664] DISCLAIMER OF WARRANTY THIS SOFTWARE AND MANUAL ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED. IN NO EVENT SHALL ECONO-SOFT OR ROBERT K. BLAINE BE HELD LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGE RESULTING FROM THE USE OR MISUSE OF THIS PRODUCT, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL OR OTHER DAMAGES. BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED. THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE. Throughout this document, references are made to the following trademarks and copyrights: TM o DX, DIRECTORY EXTENDED , and P4PS are trademarks of Robert K. Blaine/ECONO-SOFT. o IBM and PC-DOS are trademarks of International Business Machines Corporation. o LaserZ is a copyright of DMP Software. o MS-DOS is a trademark of Microsoft Corporation. o PostScript is a trademark of Adobe Systems Incorporated. C O N T E N T S 1.0 Introduction . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Feature Summary . . . . . . . . . . . . . . . . . . . 2 1.2 The ShareWare Concept -- P4PS IS NOT FREE! . . . . . . 2 1.3 General Syntax . . . . . . . . . . . . . . . . . . . . 4 1.4 File Specifications . . . . . . . . . . . . . . . . . 4 1.5 Switch Specifications . . . . . . . . . . . . . . . . 5 1.6 System Requirements . . . . . . . . . . . . . . . . . 5 2.0 File Handling Options . . . . . . . . . . . . . . . . . . 6 2.1 /Copies -- Multiple copies of each file . . . . . . . 6 2.2 /Pages -- Specify a Page Range . . . . . . . . . . . . 6 3.0 Output Control Options . . . . . . . . . . . . . . . . . 7 3.1 /Output -- Where to Send the Output . . . . . . . . . 7 3.2 /Feed -- Paper Handling Options . . . . . . . . . . . 8 4.0 Formatting Options . . . . . . . . . . . . . . . . . . . 9 4.1 /NPages -- Virtual pages per page . . . . . . . . . . 9 4.2 /ORient -- Landscape or Portrait . . . . . . . . . . . 9 4.3 Headings -- Displaying Page Headings . . . . . . . . 10 4.3.1 Header Macros . . . . . . . . . . . . . . . . . 10 4.3.2 /PHeader -- Physical Page Heading . . . . . . . 10 4.3.3 /VHeader -- Virtual Page Heading . . . . . . . 11 4.3.4 Date/Time -- Controlling the Date/Time Format . 12 4.4 /PMargins -- Specify the Physical Page Margins . . . 13 4.5 /Border -- Selecting the Border style . . . . . . . 13 4.6 /Number -- Print line numbers . . . . . . . . . . . 14 4.7 /Truncate -- Truncate or Wrap long lines . . . . . . 14 4.8 /COlumns -- Specify characters per line . . . . . . 14 4.9 /ACross -- Layout Virtual Pages Across the Sheet . . 15 5.0 Customization . . . . . . . . . . . . . . . . . . . . . 16 5.1 /CLone -- Cloning options into P4PS.EXE . . . . . . 16 5.2 DOS SET Command . . . . . . . . . . . . . . . . . . 16 6.0 Using P4PS . . . . . . . . . . . . . . . . . . . . . . 18 TM 6.1 DIRECTORY EXTENDED and P4PS . . . . . . . . . . . 18 TM 6.1.1 DIRECTORY EXTENDED -- Feature Summary . . . . 18 6.2 /NETaccess -- Handling Network Conflicts . . . . . . 21 6.3 Usage Tips . . . . . . . . . . . . . . . . . . . . . 21 6.4 Future Enhancements . . . . . . . . . . . . . . . . 22 Appendix A. Quick Reference 23 Appendix B. Registration Form 25 Index 27 i Version 1.10 P4PS 1.0 Introduction P4PS is a program designed to conserve paper when printing large amounts of text by printing anywhere from one to 64 virtual pages on each side of a physical sheet of paper on a PostScript printer -- in either Landscape or Portrait orientation. Each page is printed with an attractive (optional) drop shadow effect. The best way to get introduced to P4PS, is to see it in action! To print this document on your PostScript printer, enter the command: p4ps p4ps.doc or, if your printer is not on the DOS PRN device, specify the device on the "/o" switch. For example, if your PostScript printer is on COM1, enter: p4ps /o:com1 p4ps.doc You might initially like to experiment with changing the number of virtual pages per sheet; use the "/np" switch with a value anywhere from one to 64 in powers of two (1, 2, 4, 8, 16, 32, or 64). For example, to print the document 2 pages per sheet in a landscape mode, use: p4ps /np:2 p4ps.doc Note that this document, itself, contains no PostScript language elements. You may print it on any printer with: print p4ps.doc - or - copy p4ps.doc prn P4PS works with an 11.7 point, fixed pitch Courier font which normally yields 66 lines per page at 80 characters per line. (A "point" is one 72nd of an inch.) Although a 12 point font is normally thought of as standard, most PostScript printers are not capable of printing right up to the edge of the page. Add P4PS's drop shadow border and a 12 point font is too large. The 11.7 point size works well. P4PS performs it's magic by utilizing PostScript's exceptional scaling, rotating, and translating capabilities. P4PS always produces one standard page at a time telling the PostScript driver where on the page to place it and how to scale it. This results in reduced font sizes as the number of virtual pages per sheet increase. For example, an equivalent of about a 5 point font is used in the default 4 virtual-page-per-physical-page mode. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 1 P4PS Version 1.10 1.1 Feature Summary o Print multiple files to a PostScript printer with an attractive (optional) drop shadow. o Prints anywhere from one to 64 virtual pages per physical page in Landscape or Portrait orientation. o Handles up to 255 columns per line. o Control physical and virtual page headers using macros to determine exactly what information is printed; determine the exact format of date displays. o Output to any DOS device or file specification. o Print multiple copies of each file. o Limit P4PS to a range of pages instead of the entire document. o Select automatic, manual, or semi-automatic paper feeding. With semi-automatic, P4PS pauses the printer at every other page allowing you to print both sides. o Other options allow you to truncate instead of wrap long lines, print line numbers to the left of each line, layout virtual pages across or down the physical page, specify physical page margins, or specify what to do when a file is interlocked on a network. o Self-cloning -- allows you to write default options directly into P4PS.EXE -- creating any number of customized versions. 1.2 The ShareWare Concept -- P4PS IS NOT FREE! P4PS is ShareWare and, as such, is dependent on user support for ongoing development. Please support the ShareWare concept by registering and paying for software that you find useful. Please observe a two week evaluation period after which time you should register or discontinue use of P4PS. Whether you find use for P4PS or not, please pass it on to your friends and associates. The disk file, ORDER.FRM, or Appendix B of this manual may be used for registration and ordering. A 15% discount is offered when ordering two or more ECONO-SOFT products at the same time. Please address all registrations and correspondence to: ECONO-SOFT CompuServe [73267,1664] Page 2 1.1 Feature Summary Version 1.10 P4PS P.O. Box 181030 InterNet: 73267.1664@CompuServe.COM Austin, TX 78718-1030 512-832-1675, 800-367-7590 Registration: $39.95 (includes printed manual). Postage: $10 on international orders (free in US). Texas residents: Please add 8% sales tax. MasterCard and Visa accepted; include expiration date. ECONO-SOFT has a 30-day, no questions asked, return policy so you may try a fully registered version at no risk. See the file LICENSE.FRM for a sample site license agreement. _______ ECONO-SOFT is a member of ____|__ | (tm) the Association of Shareware --| | |------------------- Professionals (ASP). ASP | ____|__ | Association of wants to make sure that the | | |_| Shareware shareware principle works |__| o | Professionals for you. If you are unable -----| | |--------------------- to resolve a shareware- |___|___| MEMBER related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you resolve a dispute or problem with an ASP member, but does not provide technical support for members' products. Please write to the ASP Ombudsman at P.O. Box 5786, Bellevue, WA 98006 or send a CompuServe mail message to ASP Ombudsman [70007,3536]. A non-registered P4PS.EXE will periodically display a reminder message requesting registration. This message is driven off of a random number generator and should appear approximately 5% of the time (your mileage may vary). The message may be cleared by hitting a key. After 60 seconds, P4PS will automatically continue -- allowing unattended use during your evaluation. As shipped from ECONO-SOFT, P4PS.EXE is not registered. This is so you may pass copies around to your friends and associates. The P4PS_REG.EXE program is used to copy P4PS.EXE to another disk/directory and register the copied program. If you received a disk from ECONO-SOFT, P4PS_REG.EXE will be pre-registered with your name and will copy and insert your name in P4PS.EXE. If you downloaded the P4PS package from a bulletin board, P4PS_REG.EXE will not be pre-registered. If you register with ECONO-SOFT by phone or through electronic mail, you will receive your customer number and an encode number directly. P4PS_REG.EXE will then be able to register your copy using these numbers. Regardless of how you register, once you've registered, a distribution disk will be mailed to you containing a pre-registered P4PS_REG.EXE. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 3 P4PS Version 1.10 1.3 General Syntax P4PS's command format complies with the original DOS standard -- i.e. the standard that DOS was modeled after. The problem in the PC community is that everyone has a better idea for program syntax so there really are no standards. The P4PS syntax conforms to that used by all DOS utilities. The format is shown below and then explained. Items within square brackets are optional, items within curly braces may be repeated any number of times, and a vertical bar indicates that you should pick one of the options separated by the bar: P4PS [/switch {/switch}] [filespec {filespec}] The syntax for a switch designation is as follows: switch ::= /name[-|:[-]value[:value]|=[-]value[:value]] Now what does that mean to the average user? There are three major parts to the command line. The first is the name (and possibly the drive and path) where DOS should load P4PS from. The second part consists of option selections and the third part consists of file specifications. Option selections are done via switches. 1.4 File Specifications The file specifications conform to normal DOS wildcard conventions. There may be multiple file specifications. (See section 6.1 for hints on using P4PS with ECONO-SOFT's popular command-oriented directory and file manager, DIRECTORY TM EXTENDED ). For example, to print all "*.H" and all "*.C" files: p4ps *.h *.c The special file name, "STDIN", may be used to cause P4PS to read from DOS STDIN thus allowing piping another program's output to P4PS as in: myprog | p4ps stdin Throughout this document, switch names are shown in mixed upper/lower case. The portion in upper case represents the minimum abbreviation. For example, the "/CLone" switch may be given as "/CLONE", "/CLO", and "/CL", but not "/C" since that is a valid abbreviation for the "/Copies" switch. Page 4 1.3 General Syntax Version 1.10 P4PS 1.5 Switch Specifications Switches may be specified either after the command name or after the file specification. There may be spaces between switches, after the command name, and between a switch and the file specification. There may not be any spaces between the '/' that starts the switch, the name of the switch, or any values associated with that switch. In general a switch is either on or off, and may have one or two values associated with it. Let's use "SW" as the name of a sample switch. The notation "/SW" will turn the switch on, and "/SW-" will turn the switch off. "/SW:value" supplies a value to the switch and "/SW:value:value" supplies two values. A switch value may be a single character option, a string, a number, a keyword, or a complete file specification. String values are enclosed in either single or double quotes. For each switch discussed in this documentation, the types of values and their defaults are given. The '=' may be used instead of ':' to assign values to a switch as in "/SW=value" or "/SW=value:value" (this format is not possible on the DOS SET Command -- see section 5). DOS limits the length of a command line to 127 characters. If you need more room to enter your commands to P4PS, simply end the current line with a comma (','); P4PS will then solicit continuation lines. P4PS limits the total file specification pattern and the total switch specification to 255 characters each -- of course, they can be intermixed. 1.6 System Requirements o Any IBM PC family or PS/2 or compatible. o About 40k above that used by DOS and any resident software. o Any DOS compatible monitor. o An Adobe PostScript compatible output device -- does not have to be connected to the PC. o MS/PC-DOS 2.x, 3.x, or 4.x. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 5 P4PS Version 1.10 2.0 File Handling Options 2.1 /Copies -- Multiple copies of each file Use the "/Copies" switch to specify multiple copies of each file. The default is one copy of each file: p4ps /cop:3 *.pas => print 3 copies of all "*.PAS" files. p4ps /c:10 announce.txt => print 10 copies of an announcement. 2.2 /Pages -- Specify a Page Range Normally, P4PS prints all pages in a file. Use the "/Pages:n:m" to limit the output to pages between "n" and "m". If "m" has a value of 0, P4PS will continue until the end of file: p4ps /pages:4:10 myfile => print pages 4 through 10 only. p4ps /p:20:0 myfile => print pages 20 through the end of the file. Page 6 2.0 File Handling Options Version 1.10 P4PS 3.0 Output Control Options 3.1 /Output -- Where to Send the Output Normally, P4PS outputs to PRN. The /Output switch is used to specify an alternate output device or file specification. Examples: p4ps /output:lpt2 => output to printer on LPT2. p4ps /o:com1 => output to printer on COM1. p4ps /o:p4ps.txt => output to a disk file. Note that if output is directed to a printer on a serial port (COMx:), the port should have been previously initialized via a DOS MODE command or a custom initialization program supplied with your printer. See your printer's manual for proper port setup. (See section 6.3 if you use a print spooler.) This is an option that you'll probably want to set once and /CLone into P4PS.EXE -- see section 5.1. If your PostScript printer is not physically connected to your PC, you can use this option to output to a file on a floppy, take the floppy to another PC, and copy it to the PostScript printer on that machine: p4ps /o:a:p4ps.txt myfile ... copy a:p4ps.txt prn Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 7 P4PS Version 1.10 3.2 /Feed -- Paper Handling Options The /Feed switch is used to control paper handling. By default, P4PS will continuously feed paper printing single sides of each page. /Feed:Continuous => continuous paper feeding (default). /Feed:Manual => totally manually operation; P4PS will pause the printer between each sheet. /Feed:Both => pauses after every other sheet to allow each page to be turned over (see section 6.3 if your printer has trouble printing both sides). /Feed:BOTHFile => similar to "Both" except that a physical page is started for each new file. For example: p4ps /f:m myfile => print myfile using manual feed. Page 8 3.2 /Feed -- Paper Handling Options Version 1.10 P4PS 4.0 Formatting Options 4.1 /NPages -- Virtual pages per page Use the /NPages switch to specify the number of virtual pages to print on each physical side of paper. The default value is 4, but this switch may be set to any power of two from 1 through 64. Values over 8 are not readable but are useful in determining the general layout of a document: p4ps /np:2 myfile => print 2 virtual pages per sheet. p4ps /np:64 mydoc => print 64 virtual pages per sheet. 4.2 /ORient -- Landscape or Portrait P4PS normally selects landscape or portrait orientation automatically to best maintain the aspect ratio of the virtual page. You can override this selection with the /ORient switch: /ORient:Automatic => P4PS selects Portrait mode for 1, 4, 16, and 64 virtual pages per sheet; and Landscape mode for 2, 8, and 32. (This is the default and is useful if the setting has been changed via DOS SET or /CLone.) /ORient:Portrait => portrait (upright) printing. /ORient:Landscape => landscape (sideways) printing. For example: p4ps /np:1 /orient:land => /np:1 would normally print in portrait mode. p4ps /np:2 /or:p => /np:2 would normally print in landscape mode. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 9 P4PS Version 1.10 4.3 Headings -- Displaying Page Headings P4PS supplies two switches to allow you to customize headings to be printed across the top of each physical page (/PHeader) and across the top of each virtual page (/VHeader). Virtual page headings are printed in a Courier-Bold fixed-pitch font (scaled down from 11.7 points in single-page mode) and physical page headers are printed in a 14-point Courier-Bold fixed-pitch font. Both of these switches use a macro language to describe what should be printed. Most of the macro variables relate to the current file being printed. Date/time macros have a powerful, optional format specifier which is described in section 4.3.4. 4.3.1 Header Macros The following macro variables are recognized in headings: @FSpec@ => the entire file specification. @FName@ => the file's name portion only. @FExt@ => the file's extension only. @FPath@ => the file's path only. @FDate[:fmt]@ => the file's date/time of last modification (see section 4.3.4 for a description of the optional "fmt"). @PPage@ => the physical page number. @VPage@ => the virtual page number. @Now[:fmt]@ => the current date/time (see section 4.3.4). @@ => actually prints an "@". @_@ => inserts an "equal number of spaces" to fill the line; may be used multiple times to center or space fill headings. 4.3.2 /PHeader -- Physical Page Heading This option selects the format of the physical page header printed in a 14-point Courier-Bold fixed-pitch font. The default header is "@FSpec@@_@@FDate@" which prints the full file specification on the left and the file's last modified date/time on the right. Page 10 4.3 Headings -- Displaying Page Headings Version 1.10 P4PS This results in a header that might look like: "C:\PATH\MYFILE.EXT 90-Oct-14 14:00:33" Examples: p4ps /ph:'@_@@fname@@_@' myfile => prints the current file name centered on the page. p4ps /ph'Project X@_@@now@'myfile => prints "Project X" on the left and the current date/time on the right. p4ps /ph- => do not print a physical page header. 4.3.3 /VHeader -- Virtual Page Heading This option selects the format of the virtual page header printed in a Courier-Bold fixed-pitch font (scaled from 11.7 points in full-page mode). The default header is "File: @FSpec@@_@Page: @VPage@" which prints the full file specification on the left prefaced by the word "File: " and the virtual page number on the right prefaced by "Page: ". This results in a header that might look like: "File: C:\PATH\MYFILE.EXT Page: 3" Examples: p4ps /vh:'@fname@@_@@fdate@' myfile => print the file name on the left and the file date on the right. p4ps /vh- myfile => do not print a virtual page header. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 11 P4PS Version 1.10 4.3.4 Date/Time -- Controlling the Date/Time Format P4PS allows great flexible in determining the format that dates and times are printed in. Both the "@Now@" and "@FSpec@" macros allow an optional parameter specifying the date/time format. The following substitutions are made (assuming the current date/time is 2/5/91 at 23:14:10): yy => 2 digit year (91). yyyy => 4 digit year (1991). mm => 2 digit month (02). dd => 2 digit date (05). hh => 2 digit hour (11 or 23 -- see below). mi => 2 digit minute (14). ss => 2 digit seconds (10). month => Full month name (february). mon => 3 letter month name (feb). doweek => Full name of the day of the week (tuesday). dow => 3 letter day of week (tue). pm => Am/Pm indicator -- results in "am" or "pm". p => Am/Pm indicator -- results in "a" or "p". All two digit formats (except "yy") will suppress a leading zero if the format is capitalized -- i.e. "mm" produces "02" and "MM" produces " 2". If "month", "mon", "doweek", or "dow" is fully capitalized, the resultant name is fully capitalized; if only the first letter is capitalized, the resultant first letter is capitalized. If an AM/PM indicator is present, a 12-hour format is used for "hh" and the AM/PM will be replaced with the appropriate letters. The "a", "p", "am", or "pm" is capitalized to agree with the indicator. The default format is "yy-Mon-dd hh:mi" which produces "91- Feb-05 23:14". Page 12 4.3 Date/Time -- Controlling the Date/Time Format Version 1.10 P4PS Format examples: Doweek, Month Dd, yyyy => "Tuesday, February 5, 1991". Mon Dd, yyyy Hh:mipm => "Feb 5, 1991 11:14pm". Dow, Mm/dd/yy Hh:mi:ss => "Tue, 2/05/91 23:14:10". Dd-mm-yy at hhmi => " 5-02-91 at 2314". Example of use on /PHeader: p4ps /ph:'@fspec@@_@@now:Mm/dd/yy:hhmi@' myfile => print the full file specification on the left and the date (' 2/05/91:2314') on the right. 4.4 /PMargins -- Specify the Physical Page Margins You can specify the physical page margins, in points (72nds of an inch) by use of the /PMargins switch. Note that increasing these values too much may result in some text being lost. The default values, 46 points in each dimension, provide about 2/3s of an inch all around the printed images. Note that most PostScript printers will not allow you to print right to the edge of the paper, so don't try to set these values to 0. For example: p4ps /pm:20:30/np:1/bord:none/ph-/vh- => maximum paper utilization. p4ps /pmarg:108:108 => 1.5" borders all around. 4.5 /Border -- Selecting the Border style Normally, P4PS prints a dropshadow border around each virtual page of text. Use the /Border switch to change this: /Border:None => do not print a border. /Border:Box => print a simple box only. /Border:Dropshadow => the default drop shadow border. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 13 P4PS Version 1.10 4.6 /Number -- Print line numbers Often it is convenient to number each line of a printed file. You may specify the width of the line number field as a value to the /Number switch. This value defaults to 3 if not specified. If the line number field requires more width than that specified by the width given, the field automatically expands as needed: /Number => print line numbers in a 3- column width. /Number:5 => print line numbers in a 5- column width. /Number- => turn line numbers off if previously turned on or cloned into P4PS.EXE. 4.7 /Truncate -- Truncate or Wrap long lines By default, P4PS wraps long lines and prints a "+" in the left margin to indicate a continuation line. Use the "/Truncate" switch to truncate long lines instead -- in which case a "+" is printed in the right margin. If "/Truncate" has been cloned into P4PS.EXE (see section 5.1), you may revert to wrapping by using "/Truncate-": p4ps /t myfile => truncate long lines. p4ps /t- myfile => wrap long lines (default). 4.8 /COlumns -- Specify characters per line The /COlumns switch may be used to change the number of columns per line -- up to 255 (default is 80). Note that the number of lines per page will change to fill the page. To print a spreadsheet sideways in landscape mode, print your spreadsheet to disk as an ASCII file and then issue: p4ps /np:1 /orient:land /col:255 myspread.txt -or- p4ps /pm:20:30/np:1/ph-/vh-/b:n/or:l/col:255 spread.txt Page 14 4.7 /Truncate -- Truncate or Wrap long lines Version 1.10 P4PS 4.9 /ACross -- Layout Virtual Pages Across the Sheet Normally P4PS lays out virtual pages down the physical page. Use /ACross to layout the pages across instead. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 15 P4PS Version 1.10 5.0 Customization 5.1 /CLone -- Cloning options into P4PS.EXE You may decide there are certain options you want set all the time. The most notable of these will be "/Output" if your printer is not on the DOS PRN device. Use the /CLone switch to write these options directly to P4PS.EXE. You must be in the same directory as P4PS.EXE when using the /CLone option. When P4PS is invoked with /CLone, it will not process any files; it simply modifies itself and exits. The /CLone switch is only available after P4PS.EXE has been registered: p4ps /o:lpt2 /number /cl => write the output device and line numbering options to P4PS.EXE. It is possible to create multiple, customized versions of P4PS.EXE using /CLone. For example, to create a version, called "FULLPS.EXE", that prints 1 virtual page/sheet with no borders, no headers, and smaller margins than normal, execute the following sequence on a copy of P4PS.EXE: copy \other\copy\p4ps.exe . p4ps /pmarg:20:30/npage:1/ph-/vh-/border:none /clone rename p4ps.exe fullps.exe Note that cloning is cumulative. The only way to start with a default set of parameters, is to go back to the distribution copy -- or reset everything manually. 5.2 DOS SET Command Alternatively, P4PS will also read an environment variable named P4PS to determine default settings. The same result as the /CLone example above could be achieved by placing the following command in your AUTOEXEC.BAT: set p4ps=/o:lpt2 /number Page 16 5.0 Customization Version 1.10 P4PS Options specified on the DOS SET Command may be temporarily ignored by starting a switch with a double slash. The double slash will not affect options cloned into P4PS.EXE: p4ps //trunc myfile => ignore the DOS SET Command. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 17 P4PS Version 1.10 6.0 Using P4PS TM 6.1 DIRECTORY EXTENDED and P4PS P4PS works very well with ECONO-SOFT's powerful, command- oriented, directory and file management utility, DIRECTORY TM EXTENDED . DX has a very powerful file matching engine. You can specify multiple inclusion patterns (separated by "+") and exclusion patterns (separated by ";"). Each pattern looks similar to DOS' wildcards but allows you to place characters before and after the "*" and have multiple "*"s in each pattern. For example, the following command will select all filenames ending in "10" with an extension of ".h" or ".c" and all files starting with an "n" and ending in "10" with an extension of ".txt". Files starting with "f" or having an "x" anywhere in their names will be excluded. Files like "abc10.h", "proj10.c", and "notes-10.txt" would match while "file10.c" and "projx-10.h" would not match. DX will run P4PS repeatedly passing each file one-by-one: dx *10.h + *10.c + n*10.txt ; f* ; *x* /run:'p4ps $n' You can further qualify files based on size or date/time ranges. The following command will select all "proj*.*" files modified between January 2, 1990 at 6pm and March 14 of the current year as long as their file sizes fall between 100 and 10000 bytes, sort the list by name and extension ("/sort:ne"), and call P4PS to print two copies of each file. The "/v-" switch turns off the default verification -- normally DX asks for verification for each file before processing. dx proj*.* /since:2-jan-90:1800 /before:14-mar /size:100:10000 /sort:ne /v- /run:'p4ps $n /cop:2' TM 6.1.1 DIRECTORY EXTENDED -- Feature Summary o Full path and hard disk support including logical drives. Page 18 6.0 Using P4PS Version 1.10 P4PS o A very powerful and flexible file-matching engine allowing multiple wildcards and additional characters following and between the wildcard characters: dx *test => matches files ending in "TEST" like "FILETEST", "XTEST", and "TEST". dx a*b => files starting with "A" and ending with "B". dx f*1*x.*x => files starting with "F", having "1" anywhere in their names, ending with "X", and having an extension ending in "X" like "F1AX.X" or "FILL1_XX.AXX". dx *te?? => any file ending in four characters of which "TE" is the fourth-to- last and third-to-last characters like "TEST" and "FILETEMP". o Multiple file specifications can be given -- both as inclusion and exclusion patterns: dx .bas+.pas;*t => will match files with extensions of ".BAS" and ".PAS" only if their names do not end with a "T". dx *t*+my*e;.pas => all files that have a "t" anywhere in their names; AND all files that start with "my" and end with "e"; UNLESS they have an extension of ".PAS" -- "MYFILE.EXT", "TEST", and "XTY.C" would match while "TEST.PAS" would not match. o DX can search all directories, list all directory names, and test whether a set of files can fit on a different disk. o DX can search any and all Compressed Files (CFs) -- ARC, LBRs, LZHs, PAKs, PKAs, ZIPs and ZOOs -- using full pattern matching; compare files within one CF to normal DOS files or files in another CF; rename and change the date/time of files within some CFs. o MOVE, COPY, COMPARE, DELETE, and RENAME files across disks and directories. APPEND files to pre-existing files. Change file attributes and date/time stamp. Automatically "Go Bak" to a previous .BAK file. Move or copy entire directory trees and subtrees maintaining the directory structure. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 19 P4PS Version 1.10 o Security conscience? DX can wipe the data in a file before deleting it... no unerase/undelete program can recover data that has been wiped. (DX has multiple wiping options including the Department of Defense's DoD 5220.22-M specification.) DX can also produce either a 16-bit Cyclic Redundancy Check (CRC), a 32-bit CRC, or a simple checksum of your files for data integrity checking -- useful in detecting Trojan horses or verifying files transferred electronically! o FULL NETWORK SUPPORT! Including the ability to report, set, and clear the "Network Share" file attribute. DX has the option to wait for a file that's interlocked on another network node. o You can specify exactly which file attributes to display. See any hidden or system files or hidden directories. o You can select files within (or outside of) a specified range of file sizes and/or dates/times. o Have you ever received a new disk and wanted to know immediately what commands are available? An option displays all ".COM", ".EXE", and ".BAT" files. o DX can sort files by any combination of filename, extension, size, date/time, or file attributes -- ascending or descending. Sort files within Compressed Files (ARC, ZIP, etc.). The sorted output may be across the screen (or printer) or columnar. o All of DX's special processing may be verified on a file-by-file basis (default) or performed automatically. o You can carry all of the extensive pattern and file matching capabilities into ANY TASK you need to perform. DX can RUN an external utility or command synonym against all files selected or generate (and, optionally, internally execute) DOS batch files for you. Couple this with the ability to search all Compressed Files and you can build batch files to process your entire hard disk. (DX can swap itself out to give your applications maximum available memory.) o DX has an extensive set of output formatting options -- including colors, printer formatting, "UPPER", "lower" or "Initial Caps" cases, 12 or 24 hour time formats, and screen width, height, and screen-handling options. o DX is fully customizable -- set your favorite options once and they will always be used. TM Page 20 6.1 DIRECTORY EXTENDED -- Feature Summary Version 1.10 P4PS o Make decisions in batch files based on the ERRORLEVEL set by DX -- i.e. if files or disks exist or don't exist; if files compare; if a copy, move, rename, delete, etc. was successful or not. 6.2 /NETaccess -- Handling Network Conflicts The /NETaccess switch may be used to determine how P4PS will handle a Local Area Network conflict ("Sharing Violation" or "Lock Violation"): o The default (/NET:Criterr) puts the standard flashing critical error message at the top of the screen and allows you to select 'A'bort, 'R'etry, 'I'gnore, or 'F'ail. In addition, selecting 'W'ait switches to the /NET:Wait mode. o Selecting /NET:Fail will not give a flashing message at all, the critical error handler will automatically return a fail to P4PS resulting in an appropriate message. o Selecting /NET:Wait, you'll get a flashing message that includes "waiting for network access". In a couple of seconds, the message will disappear and P4PS will initiate a retry. When the message is blinking onscreen, you can answer 'A'bort, 'I'gnore, or 'F'ail yourself (if you get tired of waiting). /NETaccess:Criterr => default error handler. /NETacc:Fail => automatic fail. /NET:Wait => wait for file. 6.3 Usage Tips If you use a print spooler, like DMP Software's LaserZ, please consult the spooler's manual for information on initializing the printer port. If you use LazerZ, you should temporarily disable it prior to running P4PS by issuing the command "LZ /PS-" and reenable it with "LZ /PS" after running P4PS." Some PostScript printers have difficulty printing both sides of a page -- occasionally crinkling the page when the second side is printed. To avoid this problem, use a heavier paper. Strathmore's Legacy 24 pound paper has a smooth finish on both sides and works very well for printing both sides. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 21 P4PS Version 1.10 6.4 Future Enhancements It is likely that P4PS will evolve into a much more powerful utility in the future. Features under consideration are: o The ability to print files already in PostScript -- i.e. take the output of your word-processor and display it 4 pages per sheet. o /Feed:2Pass -- print all of the first side, pause to allow the entire ream to be reinserted, and print the back side. o Booklet printing options correctly placing the appropriate pages opposite each other. o Paper selection options to handle other paper sizes -- A4, Legal, etc. o Incorporation of the powerful file matching capabilities of DX. o Verified delete after printing. You can influence the development of P4PS by: 1. Registering and supporting P4PS. 2. Sending in your suggestions and feature requests. Page 22 6.4 Future Enhancements Version 1.10 P4PS Appendix A. Quick Reference Options: /ACross => layout virtual pages across instead of down the page. /Border:keyword => specify the border: "None", "Box", or "Dropshadow" (default). /CLone => clone current options into P4PS.EXE. /COlumns => specify number of columns per line (default is 80). /Copies:n => number of copies of each file. /Feed:keyword => paper handling: "Continuous", "Manual", "Both", or "BOTHFile". /NETaccess:keyword => network conflict handling: "Criterr", "Wait", or "Fail". /NPages:n => specify the number of virtual pages per physical page to be printed. /Number:n => print line numbers using a field width of "n" ("n" defaults to 3). /ORient:keyword => specify "Landscape", "Portrait", or "Automatic". /Output:spec => output to device or filespec. /Pages:n:m => limit output to pages "n" through "m". /PHeader:'header' => specify the physical page header. /PMargins:x:y => specify the physical page margins in 1/72nds of an inch (default=46:46). /VHeader:'header' => specify the virtual page header. /Truncate => truncate long lines. Header Macro Variables (for use with /PHeader and /VHeader): @FSpec@ => the entire file specification. @FName@ => the file's name portion only. @FExt@ => the file's extension only. @FPath@ => the file's path only. @FDate[:fmt]@ => the file's date/time of last modification (see section 4.3.4 for a description of "fmt"). @PPage@ => the physical page number. @VPage@ => the virtual page number. @Now[:fmt]@ => the current date/time (see section 4.3.4). @@ => actually prints an "@". @_@ => inserts an "equal number of spaces" to fill the line; may be used multiple times to center or space fill headings. Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 23 P4PS Version 1.10 Date/Time Format (for use on @FDate@ and @Now@ Header Macros): yy => 2 digit year (91). yyyy => 4 digit year (1991). mm => 2 digit month (02). dd => 2 digit date (05). hh => 2 digit hour (23). mi => 2 digit minute (14). ss => 2 digit seconds (10). month => Full month name (february). mon => 3 letter month name (feb). doweek => Full name of the day of the week (tuesday). dow => 3 letter day of week (tue). pm => Am/Pm indicator -- results in "am" or "pm". p => Am/Pm indicator -- results in "a" or "p". All two digit formats (except "yy") will suppress a leading zero if the format is capitalized -- i.e. "mm" produces "02" and "MM" produces " 2". If "month", "mon", "doweek", or "dow" is fully capitalized, the resultant name is fully capitalized; if only the first letter is capitalized, the resultant first letter is capitalized. If an AM/PM indicator is present, a 12-hour format is used for "hh" and the AM/PM will be replaced with the appropriate letters. The "a", "p", "am", or "pm" is capitalized to agree with the indicator. Page 24 Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Version 1.10 P4PS Appendix B. Registration Form If you find P4PS useful, please send your registration fee. This payment is the only incentive to continue to produce quality software at affordable prices. Please support the ShareWare concept and send a registration fee of $39.95 (includes a printed manual). Also, whether you use P4PS or not, please pass P4PS.EXE and P4PS.DOC on to as many people or bulletin boards as possible. Dealer inquiries welcome. See the file ORDER.FRM for a 15% discount when ordering two or more ECONO-SOFT products at the same time. Corporate licenses available -- see the file LICENSE.FRM. ECONO- SOFT offers a 30 day, no questions asked, money-back guarantee. Name: __________________________________ Date: ____/____/____ Address: ________________________________________________________ ________________________________________________________ City: __________________________________________ State: _____ Country: ___________________________ Zip/Postal Code: __________ Phone: _______________________ E-Mail: _______________________ Version: ________ My Copy From: ________________________________ I am enclosing $______ ($39.95 minimum -- includes a printed manual) to help support P4PS. Texas residents please add 8% sales tax. International orders, please add $10 in US funds. Please charge my credit card as indicated: Master Card or Visa # _____________________________ Exp ___/___/___ Signature ________________________________________________________ Please address all orders and correspondence to: ECONO-SOFT CompuServe [73267,1664] P.O. Box 181030 InterNet: 73267.1664@CompuServe.COM Austin, TX 78718-1030 800-367-7590, 512-832-1675 Please use the back to give any comments you can think of about P4PS. What do you think its best/worst features are? Do you have any suggestions? Complaints? (use the back if necessary) Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 25 P4PS Version 1.10 Page 26 Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Version 1.10 P4PS Index /ACross 15 defaults See: /Border 13 customization /CLone 16 Directory eXtended 18 /COlumns 14 DOS MODE command 7 /Copies 6 DOS SET Command 5, 17 /Feed 8 drop shadow 13 /NETaccess 21 DX 18 /NPages 9 /Number 14 E /ORient 9 environment variable 16 /Output 7 /Pages 6 F /PHeader 10 Fail 21 /PMargins 13 FDate 10 /Truncate 14 feature summary 2 /VHeader 10, 11 FExt 10 fixed pitch 1 A FName 10 ASP 3 FPath 10 Association of Shareware FSpec 10 Professionals 3 H B headings 10 border selection 13 Both 8 I BOTHFile 8 installation See: box 13 customization InterNet 3 C cloning 16 L columns 14 landscape 9 command format 4 LaserZ 21 CompuServe 2 line numbers 14 configuration See: line width 14 customization lock violation 21 Continuous 8 Courier 1 M crinkling 21 macro language 10 Criterr 21 Manual 8 critical error 21 margins 13 customizing 16 multiple copies 6 D N dates 12 network conflicts 21 Now 10 Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT Page 27 P4PS Version 1.10 O S orientation 9 serial port 7 output device 7 ShareWare 2 sharing violation 21 P smooth finish 21 page headings 10 page range 6 T paper 21 times 12 paper handling 8 truncate 14 piping 4 portrait 9 V PPage 10 VPage 10 print spooler 21 PRN 7, 16 W Wait 21 R wildcard 4 registering 2 wrap 14 Page 28 Copyright (C) 1991, Robert K. Blaine/ECONO-SOFT