Computing.Net > Forums > Windows NT > Automatic naming of a PRN file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatic naming of a PRN file

Reply to Message Icon

Name: Neelima Thota
Date: July 8, 1999 at 08:04:06 Pacific
Comment:

Hi...!!
For one particular application of mine, I need to print to a file. I am trying to automate the process of naming that file. Is there any way by which we can achieve this .....maybe by writing some scripts or routines. First and foremost is it possible to auotmate that process. Any Suggestions???
Thanks,



Sponsored Link
Ads by Google

Response Number 1
Name: Suresh
Date: August 18, 1999 at 09:48:55 Pacific
Reply:

Hi Neelima,

If u are using NT,u can add a port to the system ,of type FILE (Instead of LPT1,LPT2 etc) and name it.Then add a printer to that port.whenever u print using this newly configured printer the o/p will be redirected to the file u have named when u configured the port.This is done automatically.The only problem is next time when u print , the previous contents will be overwritten.You may need to rename the file to something else using ur application before printing the next time.

if you are using windows 95,I think u are stuck up.Microsoft does not document anything like this in WIN-95,but I am sure there will be some undocumented way,since Windows NT is a souped up version of Windows-95.

Regards.


0

Response Number 2
Name: Tom
Date: January 21, 2000 at 16:09:02 Pacific
Reply:

Hi Neelima
I had exactly the same requirement as you heres how to do it.........if using win95/98
Select properties of print to file printer.
goto details tab.
click add port
select other
type path for file in box that appears.
eg C:\Temp\Output.prn
Next time you print to file....woopeeeeeeee!
As Suresh rightly points out however, everytime you print it will overwrite the previous file - I found you're message whilst looking for a cure to this problem
(need someway of appending to this file - anyone else got any ideas) - will let you know if i find the answer!
Tom


0

Response Number 3
Name: Bob
Date: June 9, 2000 at 10:05:11 Pacific
Reply:

To append, you could try somthing like this after creating the output file:

Copy /B C:\Temp\Appended.prn + C:\Temp\Output.prn C:\Temp\Appended.prn


This will "stack up" the contents of your Output.prn files in C:\Temp\Appended.prn. Be sure to include the "/B" parameter. You can batchfile the process or use Scripting to run the output file into the storage file after each new output file is created. IHTH!

BT


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Automatic naming of a PRN file

What is the name of the registry file www.computing.net/answers/windows-nt/what-is-the-name-of-the-registry-file/15704.html

Math in a batch file (NT) www.computing.net/answers/windows-nt/math-in-a-batch-file-nt/21246.html

copying files listed in a text file www.computing.net/answers/windows-nt/copying-files-listed-in-a-text-file/13941.html