Jump to content

Recommended Posts

I love the way Matt Healy's Text Tools workflow looks, and I wanted a workflow to move selected finder items to a specific folder in the same way that you can create a new text file in his workflow.


I don't know Applescript or shell script, but I do know how to grab pieces of code from other places and throw them at Applescript editor until something works. After several weeks of googling and throwing rotten apples at the wall, I've finally gotten the workflow to work.


All you have to do is select the item you want in the Finder and type "move" and the name of the folder you want in Alfred.



Then hit enter and voila! It moved!


You can download the workflow here.



Questions/comments/concerns/suggestions, please let me know! This is my first workflow and I have very little idea what I'm doing.

Edited by talibusorabat

Share this post

Link to post

Nice Idea,

I have modified the script, so that multiple selections are working:

on alfred_script(q)


tell application "Finder"

set source to selection

end tell


if (count of source) is greater than 1 then

set fileList to every item of source

repeat with source in fileList

doMove(source, q)

end repeat


doMove(source, q)

end if


end alfred_script


on doMove(source, destination)


set source to (POSIX path of (the source as alias))

set destination to POSIX path of destination


do shell script "mv" & space & quoted form of POSIX path of source & space & quoted form of POSIX path of destination


end doMove



Share this post

Link to post

Hi talibusorabat,


Thanks for your workflow.


You can also do this by setting up a hotkey under Alfred preferences > Features > File Search > Actions > File selection.


It addition it would give you all the other file actions like "Copy to...", "Reveal in finder" etc.





Share this post

Link to post

This is pretty awesome. 


1°) Is it possible to make it work with other file managers (i.e. Forklift) ? (tried to replace Finder with Forklift in the script but didn't work).


2°) Notifications are not working for me (no notifications)


3°) Is there a way to move the file to its parent folder via an action modifier? 

(i.e. select the file, type "move" in Alfred, click on enter+ctrl for example). 


4°) You didn't precise if it is working for files and/or folders. Files are working great not folders. 

Hope this is not a bug  :)

Edited by politicus

Share this post

Link to post

1) Yes, it could work with other file managers, but no, it can't work with ForkLift, as it doesn't have any AppleScript support.

3) You could do that by adding a Keyword linked to another Run NSAppleScript that moves the selected files into their grandparent directory (they're already in their parent ;))
4) I can move folders with it just fine. 

Share this post

Link to post



1°) Now I understand why some workflows work some don't with Forklift. Really glad to understand why.


3°) Unfortunately, I am not good enough at programming even if I know how to do it in the terminal with mv  :(


4°) You are right it works perfectly well with folders.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...