Windows – Dynamic file name for Generic/Text Only printer

printingwindows

I've got an ASCII print job coming from a legacy system that I don't control. Currently it's aimed at a regular printer.

I'd like to be able to catch the job with the Generic/Text Only driver and send it to a file location for import.
I can set up a local port with the path in the name and the data will end up there just fine. The problem is that it always overwrites the previous file.

Is there a way to specify an environment variable or something in the path to create a dynamic file name so that each job has a unique name?

Best Answer

There's no built-in functionality to do what you want.

I'd consider looking at RedMon, a print monitor that allows you to redirect print jobs to scripts, programs, etc. You'd install RedMon, create a "RedMon port", and in the properties for that port you can specify a program that the printer's output is redirected to. At that point, you'd just be left with writing a script that can accept the output and store it where you want.