Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 551
  • Last Modified:

print output to a unique filename in text format

I have a customer that has a program running on a Windows XP machine. It is set up to print out 'counts' of their data every so often. Right now, the only option is to print to a printer so that program is limited to where it can print. We would like to redirect or set up a new printer that would print to a text file with a unique name such as the date and time stamp. We can set up the generic text printer but it always asks for an output file name. we would like that to be automatic.
Is this possible?
0
johnny181
Asked:
johnny181
1 Solution
 
Ram BalachandranCommented:
Not sure if you can install PDF Creator Software, so that you can select a file to print

NOVA Pdf printer has that option :How to create a PDF file without displaying the Save PDF file as dialog



http://www.novapdf.com/kb/how-to-create-a-pdf-file-without-displaying-the-save-pdf-file-as-dialog-140.html
0
 
hdhondtCommented:
You can select a fixed filename for the printer output. Go to Printer Properties > Ports. Create a new Local Port. Give it the file name (and path) as the port name, e.g. C:\test\output.txt. That way the output will always be sent to that file.

Now create a batch file that checks for the existence of that file. When it finds it, it changes the name to a one of your liking. Then it waits a few seconds (or whatever time is suitable) before it tries again.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now