|
| |||
PRINT TO A DOS PRINT DEVICE OR LPTs
copy c:\path\filename.ext lptn /B Using this method, here's how you can print Test.txt to LPT2: copy c:\printdocs\test.txt lpt2 /B This copies the file to the LPT port you specify, and the /B switch identifies it as a binary file. As a result, the control codes do not interrupt the print job. For example, a Ctrl+Z, which may appear before the end of the file, will not prematurely end the print job. UNC PATHS A number of applications, such as accounting and planning systems, simply dump text files to line printers. These often just pick up LPT devices and direct the printing to that device. You can standardize the LPTs across the network by using the Net.exe command. In addition, you can map LPT ports to Universal Naming Convention (UNC) paths from the command line. This means that by using a script--at NT login, in the Startup Group in Windows, or a batch file that starts the application--a standard set of LPTs can be maintained. Here are some examples: Net use lpt2 file://printserver1/epsonfx1170 Net use lpt3 file://printserver2/okiml591 Net use lpt4 file://printserver2/epsonlq2170 It's also worth remembering the following switch from the Net.exe command: Net use devicename /d This deletes the LPT port that's specified. When it's placed before a command that maps the LPT port to a UNC path, the command will force any currently mapped UNC path to be deleted from that LPT port. For example: Net use lpt2 /dNet use lpt2 file://printserver2/okiml591 This stops the second line from displaying an error if LPT2 is already mapped to a printer's UNC path. | ||||