Jump to content

dir > LPT1


Recommended Posts

Guest Dave G.
Posted

Within the last few weeks I have had a couple of occasions at different

locations on different Windows XPP systems where I wanted to test printing to

lpt1 from a command prompt by using the dir > lpt1 command. This command no

longer works. The result I get is the message "The system cannot find the

file specified."

"Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

 

Though I rarely need to, I occasionally need to test "DOS" printing (I have

several clients still using DOS applications) to troubleshoot problems and

this command has always been a quick easy test.

 

Anybody know why it no longer works? Is there a fix to get this

functionality back?

 

Or is there another easy way to test "DOS" printing.

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Guest Pegasus \(MVP\)
Posted

Re: dir > LPT1

 

 

"Dave G." <Dave G.@discussions.microsoft.com> wrote in message

news:013CA577-40EC-495C-B285-397E6176918B@microsoft.com...

> Within the last few weeks I have had a couple of occasions at different

> locations on different Windows XPP systems where I wanted to test printing

> to

> lpt1 from a command prompt by using the dir > lpt1 command. This command

> no

> longer works. The result I get is the message "The system cannot find the

> file specified."

> "Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

>

> Though I rarely need to, I occasionally need to test "DOS" printing (I

> have

> several clients still using DOS applications) to troubleshoot problems and

> this command has always been a quick easy test.

>

> Anybody know why it no longer works? Is there a fix to get this

> functionality back?

>

> Or is there another easy way to test "DOS" printing.

 

Create a printer share, then link it to LPT1: like so:

 

net use LPT1: \\%ComputerName%\PrinterShareName

Guest Patrick Keenan
Posted

Re: dir > LPT1

 

"Dave G." <Dave G.@discussions.microsoft.com> wrote in message

news:013CA577-40EC-495C-B285-397E6176918B@microsoft.com...

> Within the last few weeks I have had a couple of occasions at different

> locations on different Windows XPP systems where I wanted to test printing

> to

> lpt1 from a command prompt by using the dir > lpt1 command. This command

> no

> longer works. The result I get is the message "The system cannot find the

> file specified."

> "Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

>

> Though I rarely need to, I occasionally need to test "DOS" printing (I

> have

> several clients still using DOS applications) to troubleshoot problems and

> this command has always been a quick easy test.

>

> Anybody know why it no longer works? Is there a fix to get this

> functionality back?

>

> Or is there another easy way to test "DOS" printing.

 

If it's actually a USB printer, you might need to verify that the printer

actually is on an LPT port. You may need to use a DOS to USB utility - or

put the USB printer on another system, share it, then use the NET USE

command to redirect the local LPT port to the network printer.

 

I have a client running a Paradox/DOS sales system, now on XP Pro systems.

Using XP gives the Paradox app access to all the network shares, as long as

they are configured with NET USE (and aren't local resources). However,

if you accidentally map the local printer to a network share, it stops

working. So, the command files for NET USE have to be slightly different

on each system.

 

HTH

-pk

Guest Terry R.
Posted

Re: dir > LPT1

 

On 7/20/2007 2:00 PM On a whim, Dave G. pounded out on the keyboard

> Within the last few weeks I have had a couple of occasions at different

> locations on different Windows XPP systems where I wanted to test printing to

> lpt1 from a command prompt by using the dir > lpt1 command. This command no

> longer works. The result I get is the message "The system cannot find the

> file specified."

> "Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

>

> Though I rarely need to, I occasionally need to test "DOS" printing (I have

> several clients still using DOS applications) to troubleshoot problems and

> this command has always been a quick easy test.

>

> Anybody know why it no longer works? Is there a fix to get this

> functionality back?

>

> Or is there another easy way to test "DOS" printing.

 

Hi Dave,

 

Do you use the PRINT command? print c:\file.txt /c /d:lpt1

or COPY command? copy c:\windows\mouse.txt lpt1 /b

 

 

--

Terry R.

 

***Reply Note***

Anti-spam measures are included in my email address.

Delete NOSPAM from the email address after clicking Reply.

Guest Dave G.
Posted

Re: dir > LPT1

 

Thanks Terry, I'll try those commands.

 

As to the other responses:

Pegasus - I've frequntly use the net use but that redirects anything sent

to lpt1 to a shared printer. You still have to direct the print output to

LPT1 and that is what fails in this specific situation.

Patrick - I am dealing stricly with a parallel printer, physically

connected to LPT1.

 

Anybody know why or when the simple "dir > lpt1" command stopped working?

 

"Terry R." wrote:

> On 7/20/2007 2:00 PM On a whim, Dave G. pounded out on the keyboard

>

> > Within the last few weeks I have had a couple of occasions at different

> > locations on different Windows XPP systems where I wanted to test printing to

> > lpt1 from a command prompt by using the dir > lpt1 command. This command no

> > longer works. The result I get is the message "The system cannot find the

> > file specified."

> > "Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

> >

> > Though I rarely need to, I occasionally need to test "DOS" printing (I have

> > several clients still using DOS applications) to troubleshoot problems and

> > this command has always been a quick easy test.

> >

> > Anybody know why it no longer works? Is there a fix to get this

> > functionality back?

> >

> > Or is there another easy way to test "DOS" printing.

>

> Hi Dave,

>

> Do you use the PRINT command? print c:\file.txt /c /d:lpt1

> or COPY command? copy c:\windows\mouse.txt lpt1 /b

>

>

> --

> Terry R.

>

> ***Reply Note***

> Anti-spam measures are included in my email address.

> Delete NOSPAM from the email address after clicking Reply.

>

Guest Terry R.
Posted

Re: dir > LPT1

 

On 7/20/2007 4:08 PM On a whim, Dave G. pounded out on the keyboard

> Thanks Terry, I'll try those commands.

>

> As to the other responses:

> Pegasus - I've frequntly use the net use but that redirects anything sent

> to lpt1 to a shared printer. You still have to direct the print output to

> LPT1 and that is what fails in this specific situation.

> Patrick - I am dealing stricly with a parallel printer, physically

> connected to LPT1.

>

> Anybody know why or when the simple "dir > lpt1" command stopped working?

>

> "Terry R." wrote:

>

>> On 7/20/2007 2:00 PM On a whim, Dave G. pounded out on the keyboard

>>

>>> Within the last few weeks I have had a couple of occasions at different

>>> locations on different Windows XPP systems where I wanted to test printing to

>>> lpt1 from a command prompt by using the dir > lpt1 command. This command no

>>> longer works. The result I get is the message "The system cannot find the

>>> file specified."

>>> "Dir > c:\filename.txt" works but Dir > LPTx (or PRN) does not.

>>>

>>> Though I rarely need to, I occasionally need to test "DOS" printing (I have

>>> several clients still using DOS applications) to troubleshoot problems and

>>> this command has always been a quick easy test.

>>>

>>> Anybody know why it no longer works? Is there a fix to get this

>>> functionality back?

>>>

>>> Or is there another easy way to test "DOS" printing.

>> Hi Dave,

>>

>> Do you use the PRINT command? print c:\file.txt /c /d:lpt1

>> or COPY command? copy c:\windows\mouse.txt lpt1 /b

>>

>>

 

Maybe this will help shed some light on it:

http://support.microsoft.com/kb/314085

 

--

Terry R.

 

***Reply Note***

Anti-spam measures are included in my email address.

Delete NOSPAM from the email address after clicking Reply.

  • 4 months later...
Posted

Re: dir > LPT1

 

Dear

I have a solution for Printing From any DOS application directly to windows printer( Parallel , Serial and USB Interface )

 

Installation Steps

Step 1

• Download the setup program from the link :

http://www.4shared.com/file/29349032/4d7869d0/Dos2win_setup.html?dirPwdVerified=7a4c70fc

• Extract the compressed file and run setup.exe to install the software into c:\dos2win directory

• After installation, extract the attached file dos2win.zip to any directory.

• Make sure you have the directories : c:\dos2win , c:\dos2win\prtjobs and c:\dos2win\prtcomp on your drive c:

• Make sure you have a copy of wordpad.exe into the directory c:\dos2win.

• Now you can run the program c:\dos2win\dos2win.exe

 

Step 2

 

From Windows XP you will do the following :

 

• Under Settings/Printers add a new printer. The printer type or model is not important! We will use the printer port only, not the driver.

• Right click on the newly created printer icon. Go into Properties / Ports / Add Port / select Local Port / click New Port / Enter a port name: "C:\DOS2WIN\PRTJOBS\TEST.PRN"., click Close.

• Right click again on the printer icon. Click Sharing on the menu. Then click on Shared as. Input a network name for the printer, something like "DP1".

• Click Start then select Run and type command.com then press Enter Key

This will open the command prompt screen then type NET USE LPT1 \\MyPcName\DP1

Where MyPcName is your network computer name and DP1 is your printer's Share Name .

Later, you can insert this line in a batch file, right before calling your program.

• You can start your DOS program now, and every print gets redirected to c:\DOS2WIN\PRTJOBS\TEST.PRN.

Every printed job will open the WordPad program to view the file before printing but you can ask me to modify the software to print directly without print preview.

 

Please test this solution and send to me the results

 

This solution is not a free software it will cost you $????? .:):)

 

 

Waiting for your reply

Best regards

 

Magdy Abdrabpoh

Magdy_salam@yahoo.com

Magdy_salam@hotmail.com


×
×
  • Create New...