print redirection depending on the existence of a file
Hi
I would like to redirect print - output depending on the existence of a file
eg: if c:\printer1.txt exist print on printer 1
if c:\printer2.txt exist print on printer 2 ..
Is this a condition in a reprint action or a vbscript?
6th Nov 2007
Rudy,
You need the Script action to do this, try this script:
Option Explicit
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\printer1.txt") Then
RePrint PrintFilePath, "Printer1", DocumentName
End If
If objFSO.FileExists("C:\printer2.txt") Then
RePrint PrintFilePath, "Printer2", DocumentName
End If
7th Nov 2007
Tony
Thanks for your help
We tried the script but each time we run a print job, the service goes down and there are no entries in the log file. We use build 4.1.1581.
For testing we reduced the script:
Option Explicit
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
RePrint PrintFilePath, "HP LaserJet 5000 EG", Untitled - Notepad
and tried "Untitled - Notepad" or "Documentname". There is no print and we have to restart the service afterwards.
12th Nov 2007
Rudy,
We posted a new build at the end of last week (1581) which should solve the service problem.
You don't need quote marks if you use DocumentName, it is a variable set to the incoming document name.
12th Nov 2007
I already used the new build. It didn't solve the service problem.
12th Nov 2007
Can we copilot in to look at the system, there are some more details on how this works at www.copilot.com
13th Nov 2007
Tony
Looking forward to a copilot session next week. Please let me know what time works for you.
I am in Zurich, Switzerland.
Rudy
16th Nov 2007
Rudy,
We are in the UK so can fit in with your schedule, just send a message to support with the time and we will send you an invite.
In the mean time we have become aware of a problem with Windows DEP on some systems, it might be worth disabling DEP for the pd3service.exe program. To do this:
To set this follow these instructions:
1. Click Start, click Run, type sysdm.cpl, and then click OK.
2. On the Advanced tab, under Performance, click Settings.
3. On the Data Execution Prevention tab, click Add to add the program \Program Files\pd3service.exe
4. Click OK two times.
17th Nov 2007