Link to home
Start Free TrialLog in
Avatar of Stephen Kairys
Stephen KairysFlag for United States of America

asked on

Generic/Text only printer - how to assign to filename

I just created a GENERIC/TEXT only printer in a win 2000 machine, but I did NOT get prompted for the output filename (e.g.
C:\PRINT.PRN).

How do I setup this filename (and also, if I print one thing,
and then another, will the 2nd print job APPEND to the file
or OVERWRITE it?)

Thanks
stevefromc
Avatar of srw134
srw134

When you set this up to you select print to file as a port? It should ask you for a file name on each print job, and no you will give a different name of the file on each job and it will not append.

-sean
Avatar of Stephen Kairys

ASKER

Hmmm.....I did not see an option to print to file as a port.
At what step would I see this option?

Thanks
Should be something like, new printer->local printer->port options(under here, this is usually where LPT1: is)

-sean
Start->Settings->Printers  Add Printer
Then Scroll down to File (LPT1 will prob be selected by default)
Check File Click Next and select Generic from list.
HoweverComma,
Thank you.

OK. I tried that and was indeed prompted for a filename.
Problem now is, however, that when I try to print something
(example - from a 4NT command prompt, type

"DIR > PRN"

or

"DIR > LPT1"

the output does not go to the file I designated.
How do I work around that issue?
Thanks
if you want to put the DIR results in a file name it is simple...

DIR > filename.ext
If you are just trying to print the output of something from command line into a file use the above syntax to pipe the output to a test file. This type of printer setup will allow you from say word to print a document into a text file. When you do to file -> print and select this printer it will ask you for a file name and it will print it to the file.

-sean
HoweverComma and Sean:
Thank you both for your responses. To clarify, my needs
were not as simple as just doing

DIR > filename.ext

but actually printing from my application (a C program). I was
finally able to do it, via something similar to HoweverComma's
generic printer setup suggestion.  I will further specify exactly
what I did later this week when I am on site (I'm working
remotely today) and can more easily bounce back and forth
between this forum and my office PC.

Thanks again.
stevefromc
OK. With some help from the JPSOFT Support Forum (which I accessed b/c I'm using 4NT),
here's what SEEMED to work for me (no guarantees it will work for everyone, though).
This is a specific solution that assumed that I am on a network and that I am printing
to LPT1, so I'm not even sure it should be archived as a permanent solution.

Mods?

1. Go to CONTROL PANEL -> PRINTERS -> ADD PRINTER

2. Choose local printer (take off the check mark next to "automatically detect and install my plug-and-play printer")

3. On the next screen, scroll down the list of ports and select FILE (be sure that the radio button "Use the following port" iis checked).

4. On the next screen, select GENERIC for the manufacturer and GENERIC/TEXT ONLY for the  printer.

5. On the next screen, be sure KEEP EXISTING DRIVER is checked.

6. On the next screen, for printer name, type in a name of your choosing (e.g AGENERIC).
On the same screen, I decided NOT to make it my default printer, but I'm not sure
that is the way to go.

7.  On the next screen, I choosed SHARE THIS PRINTER, and gave it the same name
(AGENERIC)

8. On the next screen, I did not enter any information about the printer.

9. I did NOT print a test page.

10. Then, I did a NET USE on LPT1 to that printer
Net use LPT1 / d
Net use LPT1 \\steve_machine\AGENERIC
(using the network to access something on my own machine)

11. Now, whenever my application prints to LPT1, I get a dialog box asking me for the filename. I bring that box into focus, and type a filename (USING FULL PATHNAME)

12. I would imagine that once I was done needing to print to a file, I would NET USE
LPT1 back to a normal printer.

What do people think of the above?  And again, mods, since I provided this solution
(and my not apply to the general case), how do we close this question?

Thanks.
Well, I was the last person to post in this topic (on 12/25/2004).

I had provided a solution (which may not even be 100% reliable) and asked the mods
how the question should be closed;  however, no one responded to it.

Please advise.
Thanks
stevefromc
As the "author" of the question, I'm fine with this recommendation. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!