------------------------- MS-DOS v6.22 Help: PRINT ------------------------- <Notes> <Examples> <Index> ---------------------------------------------------------------------------- PRINT Prints a text file while you are using other MS-DOS commands. This command can print in the background if you have an output device connected to one of your system's serial or parallel ports. Syntax PRINT [/D:device] [/B:size] [/U:ticks1] [/M:ticks2] [/S:ticks3] [/Q:qsize] [/T] [[drive:][path]filename[ ...]] [/C] [/P] To install PRINT with the default parameters or to display the contents of the print queue on your screen without affecting the queue, use the following syntax: PRINT Parameter [drive:][path]filename Specifies the location and name of a file or set of files you want to print. You can include multiple files (usually as many as 10) on one command line. Switches /D:device Specifies the name of the print device. Valid values for parallel ports are LPT1, LPT2, and LPT3. Valid values for serial ports are COM1, COM2, COM3, and COM4. The default value is LPT1, which is also called PRN. The /D switch must precede any filename used on the command line. /B:size Sets the size (in bytes) of the internal buffer, which is used to store data before it is sent to the printer. The minimum and default value for size is 512; the maximum value is 16384. Increasing this value decreases the amount of memory available for other purposes but may speed up the PRINT command. /U:ticks1 Specifies the maximum number of clock ticks PRINT is to wait for a printer to be available (clock ticks occur about 18 times per second). If the printer is not available within the time specified, the job does not print. Values for ticks1 must be in the range 1 through 255. The default value is 1. /M:ticks2 Specifies the maximum number of clock ticks PRINT can take to print a character on the printer. Values for ticks2 must be in the range 1 through 255. The default value is 2. If a character is printed too slowly, MS-DOS displays an error message. /S:ticks3 Specifies the number of clock ticks the MS-DOS scheduler allocates for background printing. Values for ticks3 must be in the range 1 through 255. The default value is 8. Increasing this value can speed up printing while slowing down other programs. /Q:qsize Specifies the maximum number of files allowed in the print queue. Values for qsize must be in the range 4 through 32. The default value is 10. /T Removes all files from the print queue. /C Removes files from the print queue. You can use the /C and /P switches on the same command line. When the /C switch precedes the list of filenames on the command line, it applies to all files whose names follow the /C switch, until PRINT encounters a /P switch, in which case the /P switch applies to the file whose name precedes the /P switch. When the /C switch follows a filename, it applies to the file whose name precedes the /C switch and all files whose names follow the /C switch, until PRINT encounters a /P switch, in which case the /P switch applies to the file whose name precedes the /P switch. /P Adds files to the print queue. You can use the /C and /P switches on the same command line. When the /P switch precedes the list of filenames on the command line, it applies to all files whose names follow the /P switch, until PRINT encounters a /C switch, in which case the /C switch applies to the file whose name precedes the /C switch. When the /P switch follows a filename, it applies to the file whose name precedes the /P switch and all files whose names follow the /P switch, until PRINT encounters a /C switch, in which case the /C switch applies to the file whose name precedes the /C switch. Related Commands For information about configuring a printer connected to a parallel port, see the <MODE (configure printer)> command. For information about displaying the status of a printer, see the <MODE (display device status)> command. For information about configuring a printer connected to a serial port, see the <MODE (redirect printing)> command. For information about preparing printers for character-set switching, see the <MODE (set device code pages)> command. *** <Syntax> <Examples> ---------------------------------------------------------------------------- PRINT--Notes Length of a PRINT queue entry Each print queue entry can contain a maximum of 64 characters. Each queue entry includes the drive letter, directory, and any subdirectories. Limitations on switches You can only use the /D, /B, /U, /M, /S, and /Q switches the first time you use the PRINT command after starting MS-DOS. To use one of these switches after using PRINT, you need to restart MS-DOS. Use an application's print command when possible Many applications have their own print commands. You should use an application's print command to print files that you create with the application. *** <Syntax> <Notes> ---------------------------------------------------------------------------- PRINT--Examples To view the status of the print queue, type the following at the command prompt: print MS-DOS displays the name of the file being printed (if any), the names of files in the queue, and an error message, if an error condition exists. The following command removes the PENCIL.TST file from the print queue: print a:pencil.tst /c The next command shows how to remove the file PENCIL.TST from the queue and add the file PEN.TST to the queue: print pencil.tst /c pen.tst /p The remaining examples use switches that work only with the first PRINT command you use after starting MS-DOS. The following command sets up the print queue for printing on LPT1: print /d:lpt1 To specify that the PRINT command is to wait 60 clock ticks for a printer to be available and that the MS-DOS scheduler is to allocate 25 clock ticks to the PRINT command for background printing rather than the default value of 8 clock ticks, type the following command: print /u:60 /s:25 The following example specifies that PRINT has 4 clock ticks available to print each character rather than the default value of 2 clock ticks: print /m:4 To change the default maximum number of files for the print queue, use the PRINT command with the /Q switch, as the following example shows: print /q:32 *** ---------------------------------------------------------------------------- <Top of page>
Last update: December 07, 2002 14:45 by Content © 1997 Microsoft Corporation All else © 2000-2005 |