2

Is there a way to automatically backup of files and folders triggered by a file or folder replace action.

I'm looking for somthing like git-hooks or a listener of some sort that can run a version-control-like process automatically when a file or folder has been replaced.

I'm looking specifically for a hook that can trigger a script the rest is fairly straigt forward to me in terms of scripting the comparison and backup process.

The scenario is this: the art department at an add agency is delivering files to the flash developers and they are having some verisoning conflicts.

The fash developers use version control but hte art departmen does not.

The goal is to impliment a version control like environment that checks in files and tracks changes automatically when files are uploaded to the share server from the gui.

This is all taking place on the MAC operating system.


looks like I found the answer:
the FSEvents API appears to fire events associated with the file system

developer.apple.com documentation for FSEvents API

Python wrapper library for FSEvents API

mac-forums.com article

1

On Linux you can use inotify - look at http://inotify-tools.sourceforge.net/ for inotify-tools that provide a shell utility to monitor file changes.

That page also lists various other APIs for using inotify. Specifically, i would look at incron which is a cron like service that triggers commands based on file system changes. There is also a Python API as well as for other languages.

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.