Quick Tip: Tag Filer without Hazel

[Tweet : nvALT]

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.