Move most recent download to current folder

Sorry if this has already been asked or this is the wrong place.

I want to be able to either press a hotkey combo or use an alfred keyword to move the most recent file in the Downloads folder to the folder I’m currently looking at / the frontmost finder window.

The use case is I’m gather stock assets for a video and have the folder in the project open and I’m download dozens of files from stock sites and want to move them more quickly than dragging and dropping and toggling back and forth from the downloads window to the designated folder in the project. I guess I could set up a different automation to temporarily designate the default downloads folder to the folder I’m looking at, but that may change quickly depending what asset type I’m downloading and I may forget to set it back and could get messy.

I tried doing this with Alfred, but was surprised to find out Alfred doesn’t a specific Move File command. Currently, I have the most path to Frontmost Finder Window set as a variable and then the most recently downloaded file set as a variable, but I can’t figure out how to set the Frontmost Finder Window as a the destination in Alfred’s file buffer / file action menu. Was going to see if this would be easier to do with Applescript inside Alfred, but that’s outside my expertise, and hence I’m here now.


If you’re willing to pay for an app, I highly recommend Keyboard Maestro or Hazel, which make this super easy. Here’s how easy it is with Keyboard Maestro:

1 Like

You can also use conditionals to move different asset types into different folders. Something like this:

Thanks! Hmmm ya I’ve been holding off from going down those rabbit holes, but maybe now is the time.

Making sure I’m understanding, in this example, this always moves the latest downloaded file to the desktop, right? I’m looking for the destination to be variable. I have multiple projects going on at once and even in the same project, sometimes I’ll have several different places I’ll need to go hunt for stock assets and then move them to the right folders and then into my software, so I have the destination folder open already in a window. I’m just looking for a way to automate moving the most recently downloaded file into that variable folder I’m looking at, (almost always in an external drive or network share I should add, so drives are always coming and going). I’ve just been dragging and dropping but doing that dozens of times a day….looking to automate.

Sorry if that’s what you’re showing here, also why I’ve held off in these power tools, I’m not that smart yet :wink:

For what you want, Keyboard Maestro has a token that refers to the frontmost Finder window: %FinderInsertionLocation%. Here’s everything you can do with the Finder: collection:Finders Selection [Keyboard Maestro Wiki]

And here’s a macro that grabs the latest file in the Downloads folder (based on date added), and moves it to the finder window that you’re looking at, by simply pressing a hot key such as control-option-command-M.

BINGO! Yep, sorry I wasn’t understanding your first response.
First time trying Keyboard Maestro, it is…complex. I’ll try to dig into some training before my trial ends.


1 Like

I use a quick action in Shortcuts and attach a applescript to it with a keyboard shortcut to do the same thing

on run {input, parameters}
tell application “Finder”
set destFolder to the target of the front Finder window
set theFiles to choose file with prompt (“Choose files to move:”) default location (path to downloads folder) with multiple selections allowed and invisibles

	repeat with aFile in theFiles
		move aFile to destFolder
	end repeat
end tell
return input

end run

Edit: Everything below the 1st line is part of the applescript


move theFiles to destFolder
1 Like