Batch file for printing text file to virtual port

How can I write a batch file for printing a text file to a dot matrix printer? The printer is connected to the system using USB and the port is the USB002 virtual port.

-
Which OS are you using? –  Tonin Jun 20 '13 at 11:28
using windows 7 OS –  Suresh E Jun 20 '13 at 14:45
To get this to work with DOS programs, for example, you first need to share the printer. After, type: net use LPT1 \\\\yourcomputersname\printername /PERSISTENT:YES. Then you could do something like copy C:\path\to\file LPT1.
Try this instead since it's a basic text file: start /min notepad /P <filename> this prints to the default printer. –  Nathan C Jun 20 '13 at 11:35