What is the DOS name for the default printer in win 2000

  • Thread starter Thread starter Michael Green
  • Start date Start date
M

Michael Green

I want to print from an old DOS program. I need to know the name of
the printer to use in the following line:
copy filename.txt xxxx/b

Can anyone enlighten me or suggest a source of this information?
Thanks.
 
Michael Green said:
I want to print from an old DOS program. I need to know the name of
the printer to use in the following line:
copy filename.txt xxxx/b

Can anyone enlighten me or suggest a source of this information?
Thanks.

copy /b FileName.txt LPT1:

You might have to issue a page feed to force the
last page to be printed:

echo Ctrl+C > LPT1:
 
Gary Smith said:
I believe you meant Ctrl+L there.


Of course I do! I plead amnesia on the grounds of the long,
long time since I last used a DOS printer.
 
Michael Green said:
"Pegasus \(MVP\)" <[email protected]> wrote in message

Thanks, but I was looking for the name to use for the default printer,
which is not attached to lpt1: but on the network in my case. Any
ideas? Cheers.

Make a connection between your default printer and LPT1:

net use LPT1: \\YourServer\YourPrinter
 
Michael, I think there is a fundamental gap in understanding how NTx
prints from the command prompt. You do not print to a printer name, but
to an LPT device. Typically, there are 3: LPT1, LPT2, and LPT3. LPT1
is almost always a physical I/O port in the machine that you would
attach a printer too. Actually, I have no idea how you would print to a
USB printer from the command prompt, now that I think about it.

Anyway, all 3 LPT ports can be "captured", including a physical LPT1.
What that means is that you can instruct the OS to intercept any output
sent to an LPT device and reroute it to a network printer via its UNC
(Universal Naming Convention) path.

So, if you have 2 printers installed in the gui on LPT1, 2 on LPT2 and 5
network printers, that has *NOTHING* to do w/ how you print from the
command prompt.

Any output sent to LPT1 will go to the printer that is physically
attached to LPT1. Output sent to LPT2 or LPT3 will go nowhere unless
they are "captured":

net use LPTx \\[servername]\[printersharename] /persistent:[yes|no]

the '/persistent' switch will either recapture the LPT port or not at
the next logon.

hth
 
Ricardo M. Urbano - W2K/NT4 MVP said:
Michael, I think there is a fundamental gap in understanding how NTx
prints from the command prompt. You do not print to a printer name, but
to an LPT device. Typically, there are 3: LPT1, LPT2, and LPT3. LPT1
is almost always a physical I/O port in the machine that you would
attach a printer too. Actually, I have no idea how you would print to a
USB printer from the command prompt, now that I think about it.

Anyway, all 3 LPT ports can be "captured", including a physical LPT1.
What that means is that you can instruct the OS to intercept any output
sent to an LPT device and reroute it to a network printer via its UNC
(Universal Naming Convention) path.

So, if you have 2 printers installed in the gui on LPT1, 2 on LPT2 and 5
network printers, that has *NOTHING* to do w/ how you print from the
command prompt.

Any output sent to LPT1 will go to the printer that is physically
attached to LPT1. Output sent to LPT2 or LPT3 will go nowhere unless
they are "captured":

net use LPTx \\[servername]\[printersharename] /persistent:[yes|no]

the '/persistent' switch will either recapture the LPT port or not at
the next logon.

hth
Aha! Enlightenment. Many thanks, Michael
 
Back
Top