talibusorabat Posted April 4, 2014 Share Posted April 4, 2014 (edited) 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 April 4, 2014 by talibusorabat Link to comment
dirk Posted April 4, 2014 Share Posted April 4, 2014 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 else 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 Link to comment
talibusorabat Posted April 4, 2014 Author Share Posted April 4, 2014 Awesome, thank you! Link to comment
jhncbrwn Posted April 5, 2014 Share Posted April 5, 2014 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. Regards, Jhn Link to comment
politicus Posted April 6, 2014 Share Posted April 6, 2014 (edited) 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 April 6, 2014 by politicus Link to comment
deanishe Posted April 7, 2014 Share Posted April 7, 2014 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. Link to comment
politicus Posted May 1, 2014 Share Posted May 1, 2014 @deanishe 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. Link to comment
noisyneil Posted November 25, 2021 Share Posted November 25, 2021 Sorry to necro an old thread. This would solve a big organisational headache for me but I've got an issue. I have hundreds of files that I want to move into subfolders of one directory. I can move the file to the parent directory (i.e. I type its name and then hit enter), but if I drill down to select a subfolder within it, hitting enter just opens the folder in a new FInder window. Is that expected behaviour? Link to comment
deanishe Posted November 25, 2021 Share Posted November 25, 2021 14 hours ago, noisyneil said: Sorry to necro an old thread. The workflow link is dead, too Can you be more specific about exactly what you want to do? Link to comment
noisyneil Posted November 25, 2021 Share Posted November 25, 2021 Hi! I've started my own thread about it as I figured this was so old I'd be unlikely to get any responses. What a pleasant surprise that you said hello! I think this should be relatively simple for someone who knows what they're doing and I can imagine it could be very useful for anyone who has to regularly archive and sort large numbers of files to one parent directory. I'm slowly becoming a Keyboard Maestro ninja, but I'm all thumbs with Alfred and I have zero AppleScript fluency, so any help would be awesome! If you think you might be able to help, perhaps it's best to continue chatting on the other thread? I don't want to irritate people with notifications on this one. 😊 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now