Opening most recent download

Is there a way with Shortcuts to open the most recent downloaded file?

I can have it show the downloads folder or I can get the dialog to locate a file. I was thinking to find all files in the specified folder and then filter by creation or modification date with a limit of 1 and then open the file.

It seems like the hard part is getting the list of files in the folder.

Am I doing it the wrong way?


Is this what you are after?

Sample Shortcut

Hope this helps

Hi Tony,

This was also a solution I found. I don’t know whether it’s because I’m trying on a Mac or because of my OS language, but I haven’t been able to find that command.
Instead, I found this AppleScript that does it:

on run {input, parameters}
set theFolder to path to downloads folder
tell application “Finder”
open (last item of (sort files of theFolder by creation date))
end tell
return input
end run