Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

The Mac has a very nifty feature called folder actions which allow a script to be run every time a folder's contents change. Is there any equivalent to this functionality built in to Windows? I'm specifically interested in either Windows 7 or Windows Server 2008 R2. Links to documentation on such a feature would be most appreciated as well. Thanks!

share|improve this question
Something like this? – sgtbeano Dec 3 '13 at 15:54
@sgtbeano - That would be great, but I'm specifically asking if there's anything like that built into the Windows OS. – eykanal Dec 3 '13 at 16:54
Ah okay, sorry about that - I should have read the question more closely. – sgtbeano Dec 4 '13 at 9:13
Would this work -… - basically create a batch file to do the watch and then call if via task scheduler at regular intervals? Also - – sgtbeano Dec 4 '13 at 9:18
@sgtbeano - Wow, thanks. The first is polling, which is what we currently do and what I'm trying to avoid. The second is cool... not quite the OS-level (or even script-level) functionality I was hoping for, but we may be able to use it. If you add that as an answer I can +1 it! – eykanal Dec 4 '13 at 15:05

As per the comments above. The two options I can see are either to create a batch file to do the watching of a folder and then call it via task scheduler;

How to monitor a folder and trigger a command-line action when a file is created or edited?

Alternatively, you could code a solution using C++ or similar to take advantage of directory change notification as detailed on MSDN here;

As you rightly say, neither is a truly native solution, however either should get you the desired result.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .