in reply to Windows scripting

This node should be of interest for part of your requirements: how to permanently monitor a directory (note especially Win32::ChangeNotify)

This one as well: CGI::Application timeout (note especially merlyn's article)