So, there’s this service we have in Denmark called NemID (English translated: EasyID), and for some reason
, probably of lack of knowledge about how the Mac platform’s log files are organized, they’ve decided to put a log file in our user directory – URH! wrong place.
This has been bothering me quite a bit, and for quite a while now. Since I don’t think they’re going to fix the issue anytime soon, I thought why not apply a temporary fix and share how to do this with all of you who might have, if not the same, maybe similar problem.
Be gone, danid.log!
Getting rid of unwanted log-files is actually quite easy on the Mac, all we need to do is to set up a folder action from within Automator that will move a file to the trash should it be the nagging log file we want to get rid of.
1. Fire up Automator and choose the Folder Action from the template listings.
2. Choose the folder in which the unwanted file appears.
3. Search for the ‘Filter Finder Items’ action and add it – fill out the options as necessary to zero in on the unwanted file, in my case the file is called ‘danid.log’.
4. Search for the ‘Move Finder Items to Trash’ action and it below the previous action.
5. You’re done, save the folder action.
Be sure to make a test file, a dummy-replica of the unwanted file, and try to put it into the folder.