Windows – Print text file from command line without shell “print” command

command lineprintingwindows

I have a printer, an HP DeskJet 712C, that I cannot print to via the shell "print" command in Windows 7 or Windows XP. I think this is because this particular printer is a "software" printer, something like a "software" modem. I am, however, able to print from Word, Notepad, and other programs. Is there some command line utility that I can use to print text files from?

Best Answer

Try using the notepad command line switch /p? e.g.

notepad.exe /p "c:\test.txt"

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/notepadexe-command-line-options/810760c1-a45a-4013-9544-1c1208e1b389

/A <filename> open file as ansi
/W <filename> open file as unicode
/P <filename> print filename
/PT <filename> <printername> <driverdll> <port> print filename to designated printer
Related Question