views:

187

answers:

4

Now, I could go ahead and write this using FileSystemWatcher etc, but before I start coding - I wonder if there is a better option that I can re-use (rather than re-invent).

From my web-server, I want to drop files (to be printed) into a network share as a queue (ordering not hugely critical). Ideally, a windows service (or other client) on another machine would pick this file up (format tbc), print it to a pre-arranged print queue, and archive the file.

Pretty simple scenario - I just don't want to re-invent it. Any suggestions?

+1  A: 

I seem to remember BizTalk server having a file drop activity of some sort. If you can hook into the part that processes the incoming "message" (represented by the file drop, and I believe BizTalk allows for hooks into this process) then you should be able to process it in BizTalk any way you wish.

You also gain the advantage of being able to better segregate the activities that are performed on the file.

casperOne
+1  A: 

What you mentioned is just how it is done. At least that's what we do.

dirkgently
A: 

Instead of a drop-in folder, you can use send-to.

Here's the 2-line VBS solution:

  1. Create a VBScript file that takes a file and archives and prints it.
    1. Archiving is easy, just do a command line zip or something.
    2. Printing is even easier, just use the "print" verb when doing vb's Exec
  2. Create a shortcut to said VBS file in the Send To folder on you machine and Bob's your father's brother: now you can right-click on any file and send it to Print/Archive.

I'm aware it's not what you asked for, but the drop-folder approach seems just as good to me as this, so I'm putting it out there. :)

Assaf Lavie
Thanks, but this isn't for a user - it is for a server - i.e. the web server creates files and writes to a unc. "Send to" simply doesn't apply.
Marc Gravell
+1  A: 

Try out Batch & Print Pro. It has features like directory monitoring, print scheduling etc with command line options. You can run it as a service.

Gulzar
This is the most promising so far...
Marc Gravell