Link to home
Start Free TrialLog in
Avatar of samelamin
samelamin

asked on

writing a watched folder

hey All

this question has been bothering me for quite some tiime, im in the process of learning about printers and port monitiors and i am trying to print across networks

now the ideal solution would be that a client would have a virtual printer installed with a custom port and when the end user prints to this printer the document is sent (or better yet uploaded) to the server

now I also started playing about with RedMon which is essentially a port monitor that redirects an output to a program, so if you print to a document that has the RedMon port set a postscript file is created (*.PS) it then uses GhostScript to convert this file to pdf

I was thinking if I have the pdf I can then upload it to the server using an upload application that i already have running on the server, given the path uploading is very simple.

The question now is can i create a program or a watch folder that calls a program everytime redmon creates a ps file, and this program would run ghostscript to convert the postscript file to PDF then take the path and send the parameters to a web application that would upload the document


 
ASKER CERTIFIED SOLUTION
Avatar of lazyberezovsky
lazyberezovsky
Flag of Belarus image

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
Avatar of samelamin
samelamin

ASKER

yes but the thing is i dont know the name of the document being created
or will it watch out for all documents with the format *.ps?

because in realiy all im doing is watching for the creatig of a .ps file to trigger conversion, if its too difficul to accomplish then just a trigger when a ps file is created to give the path to a asp.net app which will upload the document
SOLUTION
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

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
its fine i dont need a user interface i just need to pass the path to a website
so what your saying is that i need to write my own windows service?

how do i go about doing that? I am using visual studio 2008 so what sort of project is that?
SOLUTION
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
SOLUTION
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
brilliant thanks guys