Assume we have a binary file with ESC/P commands, barcode.bin.
C:\>type barcode.bin > COM1
C:\>copy barcode.bin COM1
C:\>copy barcode.bin USB001
If one these work for you, congratulations! They didn't work on my Windows 7 64 bit OS. Windows 7 does not assign COM port to USB device. Checking the printer properties shows that it is connected to port USB001. But executing the last command above does not work. Windows 7 DOS command does not recognize USB001 as a device. I have to do this instead.
C:\>NET USE LPT1: \\COMPUTERNAME\PRINTERNAME /PERSISTENT:YES
C:\>copy barcode.bin LPT1
TADA.. It works.