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?


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

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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