Quick Tip: Tag Filer without Hazel

If you want to run the Tag Filer script, but don’t have Hazel handy, you still have everything you need to get it done. One option is to run a “cleanup” command at intervals using launchd.

The easiest way to set up a launchd task is with LaunchControl or Lingon. Create a new task with an interval timer of 5-10 minutes. Have it run the following command:

/usr/bin/mdfind -onlyin ~/Desktop -0 "kMDItemUserTags == '#*'" \
| xargs -L1 -0 ~/scripts/tagfiler.rb &> /dev/null

Replace the ~/scripts/tagfiler.rb with the path to your copy of the Tag Filer script. If you’re using something other than the Desktop for your inbox, be sure to modify the -onlyin argument near the beginning of the command.

Now the system will scan every so often for files with tags beginning with “#” and pass them one at a time to the Tag Filer script. See the post for more info on that system.

Brett Terpstra

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff on Twitter, GitHub, and Mastodon. Keep up with this blog by subscribing in your favorite news reader.

This content is supported by readers like you.

Join the conversation