Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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? leelusoft.blogspot.in/2011/10/watch-4-folder-23.html –  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 - superuser.com/questions/226828/… - basically create a batch file to do the watch and then call if via task scheduler at regular intervals? Also - msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx –  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

1 Answer 1

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;

http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx

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

share|improve this answer

Your Answer

 
discard

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.