Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to perform some action (start a vbs, batch file, or an exe, etc) upon the successful upload of a file using Windows Server 2008 R2 built-in IIS FTP server/service?

share|improve this question
up vote 0 down vote accepted

Yes, schedule a powershell script to scan the directory every 5 minutes.

share|improve this answer
What would such a script look like? Would you run this as a scheduled task or is there a way to have IIS fireoff a powershell when a file is uploaded? I'm not much of a powershell guru, but I've got a fair amount of programming background... – Nate Mar 8 '10 at 19:26
i feel bad that i can't write the script for you but I would make the script do a simple task: 1. use getChildItem to get a list of files in the FTP location, sorted by newest to oldest 2. if newer files show up then increment a timestamp value in a cache file and then do your task. Schedule with windows task manager. (This could also be done with a old-school batch file as well, depending on what your doing) – djangofan Mar 8 '10 at 19:33
This does not factor the successful completed transfer of files, nor files that are in-flight at the scheduled interval. With this approach, additional logic is required by the sending process to avoid issues (e.g. upload to ~/tmp, rename to ~/done) – jimbobmcgee May 26 '15 at 18:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.