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

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. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: