Automater - Move Files Older Than 1 Week To Trash

automator

#1

I am trying to create a folder action that moves to the trash all my screenshots that are older than 1 week from my screenshot folder to the trash. In doing this it seems to immediately deletes new screenshots but the ones in the folder that are from yesterday to 1 week ago aren’t deleted. Can someone tell me why this would happen or what I did wrong?


#2

It is puzzling and I do not see that you did anything wrong. Somehow the phrase is not in the last 1 weeks applies to files that were created earlier than a week ago (of course) AND to files that were created today (what??). That is not logical to most of us.
I would consider this a bug. But it has been around for a long time. And in Automator, for your purposes, I cannot see an easy workaround.


#3

Hazel, of course, is designed for such a purpose and would easily be set up to do what you want if you own that app.


#4

If my Mac was a work machine I would purchase but as something I use as a more of a hobby I don’t feel like spending the $30 for it currently.


#5

Check out this link.

http://www.nickshubin.com/articles/mac/find_finder_item.html

Chances could be that a Spotlight timing issue is the root cause here. As it suggests, perhaps try redesigning the Automator action to Filter Finder Actions and see if that addresses the issue.


#6

Not to say that BBech should not try this, but for me this approach does not work. On my machine, Spotlight correctly identified the files as having been created today and yet Automator considers them not to have been created in the last 1 weeks.

Filter Finder Actions did not change the behavior.