move selection

cup-de-sac by Michal Tokarczuk

It should be a simple thing to select a few files and sling them into your chosen folder. But OS X requires that you have to first open a Finder window, select the destination, then go all the way back to the location of the files you want to move and drag them in.

Wouldn’t it be much simpler if you could just select the files you want to move first, then choose the location without all the kerfuffle? Sure it would! 🙂

If you agree, then this is the script for you. I use it to move screenshots (of which I take a lot) from the Desktop to whatever location I want to store them in with a simple hotkey command (set up in Services or via FastScripts), control-command-M (‘M’ for move, of course!).

Copy the code from Pastebin

--start
tell application "Finder"
try
get selection
if selection is not equal to {} then
move selection to (choose folder)
else
display dialog "Nothing selected to move!" buttons {"OK"} default button "OK" with icon 2
end if
on error
set selection to {}
end try
end tell
--eof

🙂

Featured Picture: cul-de-sac by ~MichalTokarczuk

Advertisement

About philastokes

Independent Software Developer, Technical Writer and Researcher at SentinelOne. Explaining the unexplainable with images, video and text. Scripting anything imaginable in AppleScript, Bash, Python and Swift.

Posted on July 15, 2013, in AppleScript and tagged , , , , . Bookmark the permalink. 1 Comment.

  1. it beggars belief that this is not native functionality in the finder. but you’ve provided such a simple, neat solution. thanks mate.
    m.

%d bloggers like this: