Automater-filter finder items by date not working
Hi,
Using automator I am trying to filter a list of items in a folder by date modified, and it is selecting files it shouldn't be. I have a folder of daily database backups and I want to create a folder action that will delete any backups older than two months. This I thought would be easy, and my workflow works up to a point.
The workflow is as follows:
1. Get folder contents
2. Filter finder items:
-select all items where date last modified is not in the last 2 months.
3. Move finder items to trash.
The above workflow works if there are no items in the folder with todays date. As soon as the newest backup is added to the folder, triggers the action and any old items, plus this newest backup are moved to the trash. Why is it doing this?
I have tried various different tests to determine if it is remembering the file passed to the action when it drops in to the folder. But if I put an item with todays date in the folder then run the action by dropping an older item on the folder, it still moves the newest item to the trash.
This is bizarre behaviour unless I am missing something. Could it be that it is moving the newest item to the trash because it hasn't yet been indexed by spotlight? If that is the case then automator needs to stop using spotlight as a means of finding items because that is just rubbish.
Does anyone have any ideas?
Thanks.
Mac mini, Mac OS X (10.6.8)