Is there there a way to check a folder/file for changes (includes adding files, deleting files, changes in files,…). The 'Folder action' in Automator is only checking if any files are newly added.
Checking for folder/file changes using Automator
automatorfinderfoldersscript
Related Question
- Any way to trigger Folder Action when adding file to any subfolder
- How to make automator only perform an operation on one file at a time
- MacOS – Getting Automator file selection from multiple windows
- MacOS Automator: Save new text file in current folder
- Create an automator script to create folder + move files into created folder
- How to get folder path in Automator Folder Action
- Using Automator to change the creation date of a folder in Mojave
Best Answer
You can add a "Run Shell Script" action with the command:
This will give you all files and directories inside
<directory>
that have changed since the last change of<reference_file>
. Just make sure you modify the<reference_file>
each time you run the Automator script.Also give a look to the find manual page (enter
man find
in the terminal) for more options. Find is very powerful and further refining your search is usually a matter of a couple of additional options. E.g. to search only for directories modified after<reference_file>
:If the version that ships with OSX is not enough, you can also try the version that comes with
findutils
(brew, macports etc) which should have slightly more features.