in reply to starting a script when a file appears in a directory

All suggestions look OK, except... as far as I know, there's no way to create a true daemon under Windows: there's no fork()..:-).

So, I see two choices: 1) spend a week on writing (and three more on debugging) a Win32 service (cli/srv with pipes and msgs and stuff);

2) write
while(1) { if new_files(dir): send_m(..); bzz(60*60); }
-- and check periodically that it's running...:-).

For not to do it manually, you'll need another program usually called watchdog. Not sure if there's a "crontab" analog under W. If not, you could also put watchdog over watchdog over watchdog to increase the chances of the system always running, - unless you get another process crashing or memory-leaking or a virus or an Automatic Windows Update.:-)).

// Note that sleep doesn't "soak up resources in the meantime". Careful with memory alloc-n between cycles though.