Programming Field

PRN (printer port)・LPTn (parallel port) - DOS/Command Prompt Reference

‘LPTn’ is a kind of device file name, referring to parallel ports. n is a number such as 1, 2, etc. and LPTn would be ‘LPT1’, ‘LPT2’, ..., and ‘LPT9’.

‘PRN’ also refers to serial port, and is treated as same as ‘LPT1’.

Samples

Sample 1

print /D:LPT2 doc.txt

Specifies the output target to ‘LPT2’ for Print command.

Sample 2

echo cmdtext > PRN

Sends the text ‘cmdtext’ as a command to PRN. (The target device must recognize this command.)