You cannot simply use dir > prn to output your command line to the printer. This works only with the older DOS mode conventions and adding the fact that most new printers are not LPT but USB only adds to the problem. If you want to print from DOS to your USB printer, here's what you need to do. I will illustrate with my own printer, a HP PSC1210 connected to the USB001 port.
First, go to Printers and Faxes, right click the computer and click Properties>Sharing and select to share the computer with a share name such as HPPSC121. Click Apply>OK. Then, start the command line utility with Start>Run>cmd
Your computer will have a name (can be seen by right clicking My Computer>Properties>Computer Name). Remember it. My computer's name is matrixone. In the command line type in:
net view \\matrixone
Replace matrixone with your own computer's name. You wouldn't have anything connected to your LPT1 port, so enter:
net use LPT1 \\matrixone\HPPSC121 /Persistent:Yes
Replace matrixone and HPPSC121 with your computer and printer-share's names. The persistent option is to enable this every time you start the computer. To verify the command executed successfully, enter:
net view \\matrixone
and you should see your printer-share using the LPT1 port. Next go back to Printers and Faxes, right click the Printer, select Properties>Advanced and click the Print Processor button at the bottom. Select ModiPrint and WinPrint from the left hand side and change the change the default data type from RAW to TEXT for both of them. Click Apply>OK.
Now you can issue a command such as
dir > lpt1:
(remember the colon) and have the directory list print to your printer. To delete this, all you have to do is go back to the command prompt and enter:
net use LPT1 /Delete
Once you do this, you can print from the command line straight by just clicking on Start>Run and entering the command directly, such as:
dir G:\Downloads > lpt1:
and have the contents printed out to your computer.