Being a Mac user, I really enjoy the simple feature of tagging files and folders. Its very useful to filter by tag to quickly access any files which I have tagged regardless of where they are located.
I use this feature for images and audio. Any images or recordings I like, I tag it to keep track of them.
However, I have been thinking about a simple feature that I would love to see and would like to see if this can be done with Automator at all or perhaps there exists a simple tool already.
I would like to be able to automatically copy any files or folders to a specific location if they are tagged something specific, such as a custom label "Backup". So if I tag any file with the label "Backup" to then copy those files to my Dropbox directory or Google Drive directory.
My intention with this is to rather backup/sync curated content rather than everything. I would like to be able to go through my creative work and simply tag the files I like which then automatically get copied to wherever I sync them to the cloud.
In addition, it would be ideal for this to work for external devices as well. So if I connect a USB drive and tag any files there, they get copied to the destination.
Any advice that might point me in the right direction would be much appreciated.
rsync
command in conjunction with the "tag" library. That way, whenever a "Backup" tagged file get modified on your disk, the Dropbox, or Google Drive folder would get updated automatically with the new version of the file within x minutes.launchd
plist to do an interval scan of your drive for files taggedbackup
. An AppleScriptObjC script would be the fastest method to retrieve tagged files I believe (usually faster than the shell), which can be optimised if you can omit folders you know will never need to be scanned for such. It could also remove files from the backup location if the corresponding original is untagged later. If you’d prefer to use Automator overlaunchd
, this could be done on a schedule via Calendar. So there are clearly a few ways to approach this.mdfind "kMDItemUserTags == Backup"
to generate a list that can be used with thersync
command might be fasted then AppleScriptObjC, if not though... much easier to code.