I have an apartment for rent. My wife wanted some mini-fliers to hand out/put up. That's fine because I did the design in MS Publish last year or so. Since my wife is getting more computer-literate, I put her to work finding the files. Ultimately, we found them on a seldom-used machine named Forrest. Most recent work has been on my main desktop machine named Grant.
OK, we need fliers, but they're on Forrest, not Grant. Mary made the fixes on Forrest. Then it was time to print the fliers. I have three color printers: HP990, HP8400 and HP7400 that we use for fliers, for photos, and for correspondence, respectively. Since Forrest is seldom used, printing has become problematic. First I tried the HP990, and the network flaked out resulting in wasted paper half-printed with the fliers. And the HP990 ink jet printer was out of black ink. I went to Meijer's and bought a replacement. But the network problem persisted.
Then I tried the HP8400 and MS Publish said "there was a problem". Nothing more useful than that. I went to the internet and downloaded the HP7400 drivers and installed them. On the second try it said the install was OK. Then I printed MS Publish and got the same unhelpful message. OK, Forrest had a network problem I wasn't going to fix.
I was able to copy the MS Publish files to Grant. Tried to open and print from there. NO joy. Grant's copy of MS Publish was '97 and Forrest's copy was '02. What to do? I could not find the Publish 2002 install disk, so I couldn't just update Grant and print from there.
I went back to Forrest and checked "print to file" using each of the printer drivers. Then I copied the resulting PRN files to Grant. Now all I had to do was copy each PRN file directly to its printer.
Interesting. Back in the old DOS days it was simple. Just do this:
Copy/b file.prn LPT1:
But none of the printers are hooked directly to Grant. The HP990 is hooked to a wireless printer server with an odd name of LK96c9ea. It has two queues, p1 and p2. A couple years ago, I figured out how to print directly to it like this:
Copy/b file.prn \\LK96c9ea\p1
But the HP8400 printer has an Ethernet port and the HP7400 printer connects via wireless. It took some doing to figure out how to send bytes directly to these printers. I suppose there's probably a way using the DOS Copy/b command, but I couldn't immediately find it. But after a bit of googling I found I could use netcat or nc to send things directly to the printer's TCP/IP address port 9100. What I found worked for me is this:
nc HPM210QY047Z 9100 < file.prn
The first part "nc" is the program netcat, easily downloaded from the net from a number of places. The second and third parts is the printer/port name and port number, respectively. You can get the port name from the printer properties' Ports tab, scroll down the list until you see one port "checked" and click on configure port. The dialog will appear on which you will find the port name (in my case HPM210QY047Z), a protocol (raw) and a port number (9100).
If you ever find a way to get DOS Copy/b to accept a TCP/IP address and port as a destination, let me know.