Discussion Locked

Printing PRN Files

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

You guys are the only ones who I think might be able to help me-
> thank you!
>
> I have a file on my printer that I want to print... a prn file...
> that is, when I went to print
> something I checked the "print to file" option... which means I
> should be able to print it
> now.
>
> Apparently "all I have to do" is to drag the file and drop it onto
> my printer icon, or the
> open printer window.... yeah!
>
> I then get a pop-up that tells me there is no file association to
> perform what I want to do,
> and tells me how to set one up.
>
> I do this, and even choose what i think is the "right" file
to "run"
> it with (my printer, no
> less, or at least some printer file) and I even found the file
> using the "browse" button... so
> it should be there, right?!
>
> Not ****** likely!!!! My computer now tells me that the file does
> not exist!
>
> SO am I meant to be "sending" it to an exe file, rather than the
> printer driver, or spooler,
> or what???

I am actually asking this for someone else who I am providing tech
support for. Thanks!

Joshua Miller

11 replies

by dklippert

Here are a couple of ways to do it:

How to Print from a Command Prompt
----------------------------------

To print from a command prompt, type
"copy pathfile name.file name extension LPTport number /b"
(without the quotation marks), and then press ENTER, where:

- path is the path to the folder that you want to use to store the file

- file name is the name that you want to give the file that you are making

- file name extension is the file name extension for the filethat you are making

- port number is the number of the printer port that your printer is using, typically LPT1

For example, if you want to make a file that is named Rawprint.txt, save this file to the desktop, and your printer is connected to LPT1, you would type "copy c:\windows\desktop\rawprint.txt lpt1 /b" (without the quotation marks) at a command prompt, and then press ENTER.

This article gives you instructions on How to Enable Drag-and-Drop Printing for .prn files.

(Type the Q number in the search box at support.microsoft.com)

How to Print .prn or .ps Files in Windows 95 or Windows 98

Q158081

by jmatt

Or, if you don't want another program, here's 2 batch files,
one for creating a .txt file, the other sends it straight to
the printer.

Open Notepad (only), type in **exactly** (or copy/paste from here)

For the .txt file:

dir %1 > C:\list.txt: cls

& save as: textdir.bat

For the printer:

dir %1 > lpt1: cls

& save as: printdir.bat

I save these two files in my "Send to" folder, that way I can just
right click on the folder to execute.

----------------------------------

http://www.easydos.com/print.html

by tomsal

PRINTING .PRN FILES IN WIN9X, PART 1

If you use software that creates .prn files for printing later (e.g., as
part of a batch job), it's useful to know how to print them manually
from a command prompt. Typically, programs that print to a file via a
Printer Control Language (PCL) driver create .prn files. Programs that print to
a file using a Postscript (PS) driver create .ps files. First:

1. Open a Command Prompt session via the Start Menu or click Start |
Run.

2. Type command.
3. Click OK.

Next, to print the file, type the following command, where filename.ext
is the name of the file to be printed (include a path if needed) and LPTn
is the number of the LPT port to print to (e.g., LPT1). The /b switch
denotes that the file being printed is a binary file. It interprets control
codes within the file differently to ensure that the file is printed
properly.

copy filename.ext lptn /b

by tomsal

*DO NOT GIVE ME POINTS*

It so happens that the answers I posted were featured in the two most recent tech mails I received from Tech Republic...I'm just sharing the knowledge.

Hope it helps.

by tomsal

PRINTING .PRN FILES IN WIN9X, PART 2

In part one of this TechMail, we learned how to manually print .prn
files from the command prompt. In this TechMail, we look at a way to enable
drag-and-drop printing of these files in Windows 9x.

First, open Windows Notepad and create a new text file in the \windows
folder named printer.bat. This file should have one line:

copy %1 lpt1 /b

You may recognize this command from our previous TechMail on printing
.prn files. This line takes a variable In (%1) and copies it to lpt1 (you
can also change this to a different lpt port) with the /b switch to denote
that it is a binary file. Next, follow these steps:

1. Click Start | Programs | Windows Explorer | View Menu | Options.

2. Click New Type in the File Types tab.

3. Type Printer in the Description Of Type field.

4. Type prn in the Associated Extension field.

5. Click New.

6. Type print in the Action field.

7. Type c:\windows\printer.bat in the Application Used To Perform Action
field.

8. Click OK and then click Set Default.

9. Navigate (in Explorer) to the printer.bat file in c:\windows.

10. Right-click on the file and select Properties.

11. Click the Program tab, select the Close On Exit check box, and click
OK.

Finally, create a shortcut on the desktop to c:\windows\printer.bat by
right-clicking on printer.bat and then clicking Send To | Desktop (create
shortcut).

Once you have done this, you can drag a .prn file onto the printer
shortcut icon, right-click on a .prn file, and select Print from the context
menu or double-click the .prn file.

by tomsal

*DO NOT GIVE ME POINTS*

It so happens that the answers I posted were featured in the two most recent tech mails I received from Tech Republic...I'm just sharing the knowledge.

Hope it helps.

This discussion is closed to new replies.