Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print generic text to com1 2

Status
Not open for further replies.

ls62

Programmer
Oct 15, 2001
179
US
Hi,

I have a label printer attached to com1: of my win98 machine. I want to be able to print a simple text file to it without having to go through win spooler. I was thinking I could do something like 'copy t.txt com1:' but that seems to hang my system. Anyone know how I could do this?

I was able to copy file to printer using notepad and setting up generic/text driver, but that required me open notepad, change setup of printer each time to remove margins and header/footer data, select printer.

Really want to just click on a .bat batch file and have it output a two line txt file to com1.

File is:
-------
<crlf>
ZB<crlf>
-------

Thanks for any help.
LEE
 
It's been a long time since I've done any command line DOS stuff but I think the PRINT command would be better suited. The syntax is as follows:

print c:\file.txt /d:com1

PRINT.exe should be on your Win98 Installation Disk.

There's always a better way. The fun is trying to find it!
 
type filename > com1:
then a formfeed

or build a batch file to do it all

copy con file.txt
^m^j^n [F6]

copy con printit.bat
type file.txt > com1:

the last can be pointed by a shortcut

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
To all,

Sorry I'm a little late getting back to you. Thanks for all the suggestions. I was able to get it to work by doing the 'type file.txt >com1' within a batch file and making a shortcut to it.

Once again, thanks.
LEE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top