“Open last downloaded file” seems to open random files

Hi,

I wrote the following macro to open the last downloaded file by pressing a hotkey:

Keyboard Maestro 8.2.4 “Open last downloaded file” Macro

Unfortunately, it is not working. It seemingly opens a random file or folder, not the last one downloaded to the folder. Where is the mistake?

Thank you,
-Chris

1 Like

I use this all the time to delete the most recently added file. @peternlewis provided this, (I believe)

1 Like

Your For Each action Folder Contents collection is not sorted reversed. So it is finding the item in there with a oldest date added.

1 Like

Thank you, this wasn't clear to me.

Chris