Question

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.

Was it helpful?

Solution

Check out Taggy Tagger.

It is a macOS menu bar app which automatically tags files and copies/moves files to a specified folder. Right now, it supports Dropbox, Box, GDrive and OneDrive as destinations (actually you can select any destination folder).

How does it work?

  1. Select the folder that contains your files.
  2. Enable copy/move action (Dropbox, Box, OneDrive or GDrive)
  3. Select path to destination folder

From now on, everytime you add a file to the folder that you selected in step 1, it will add a tag and copy/move the file to the destination folder (step 3). Alternatively, perform the action for all files already sitting in the folder by pressing a button.

There is video how it works on the website as well.

[Disclaimer: I am the developer of Taggy Tagger.]

OTHER TIPS

You need to break this task up into pieces:

  • How quickly do you need the tagged files to be copied?
  • Would a daily scan through your files and folders be enough?
  • Do you expect the script to work only when you are logged in?
  • Do you need a user interface, progress indicator, or log of activity?
  • Should the files be copied into a single folder?
  • Should the folder structure be recreated in the destination?
  • How should duplicate names be handled?
  • What happens to the contents of tagged folders?

Please ask new questions for specific pieces that you need help with.

Watching Folders

AppleScript can be used to watch folders on macOS. Sadly this ability does not support watching for changes to tags:

The ability to watch folders and take action on incoming items is a powerful automation technique that enables the creation of fully unattended workflows. A watched folder might be used, for example, to watermark incoming photos, convert them to PDF, and email them to clients for review. Many companies set up script servers—dedicated robot machines that watch folders and process detected items, allowing employees to offload tedious and repetitious work in order to focus on other important tasks.

Research kqueue

Try researching the underlying kqueue mechanism. Through this queue of events a process can watch and learn about specific changes to files and folders. It is through the kqueue that Time Machine and other back up software learn about document changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top