WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printing Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Check if an LPT Port has a Device Attached

Keywords:    LPT1

Question:

How do I check that a port (LPT1) has a device on it prior to trying to print to it?

Answer:

One of our users reported the following:

I remember using a program a few years ago called SAFESEND (Shareware) that was used to check and see if a Port (or disk drive, I used it to check to see if a drive letter was a hard disk or CD) existed, and then create a DOS Errorlevel that could be checked in a batch file.

The best part about this program is that it would NOT get the infamous Abort,Retry,Fail error if the device was not there and it could also send ANYTHING (Esc codes, etc.) to a printer.

I haven't seen it around for a while but you should be able to find it on one of the (MANY) Shareware file archives on the net.


Article ID:   W13688
Filename:   Check if LPT Port has a Device Attached.txt
File Created: 2000:05:08:10:12:56
Last Updated: 2000:05:08:10:12:56