mcskrzypczak Posted April 2, 2013 Share Posted April 2, 2013 (edited) That’s my first ‘real’ workflow made to ease my everyday job workflow. Hope you will benefit from it too. What that file action does is to simply copy the name of selected folder(s) or file(s). Of course workflow works not only in Alfred File Viewer but everywhere you can select files using for example the Hotkey. → DOWNLOAD Changelog: 1.6: and again I have rewrote my workflow – now in Python it does finally support copying multiple file/folder names! 1.5: completely rewritten version now uses only bash script (4 lines of code) so it's faster allows for copying filename with its extension or without (in Run Script section delete "#" in text "#filename=${filename%.*}" this version does not support multiple file/folder names copying. If you need such option download version 1.1.1 (download link above) 1.1.1: allows for multiple file/folder names copying (only when used outside Alfred – in Finder, Forklift, etc.). Thanks for Carlos-Sz for modyfing this script! 1.1: when copying file names, file's extension is cut off 1.0: initial release Edited March 29, 2017 by mcskrzypczak New workflow version Link to comment
Carlos-Sz Posted April 12, 2013 Share Posted April 12, 2013 If multiple files or folders what is the format would you like to be copied to the clipboard? A plain list of names separated by comma (filename1, filename2, filename3)? Can you please elaborate? Link to comment
mcskrzypczak Posted April 12, 2013 Author Share Posted April 12, 2013 If multiple files or folders what is the format would you like to be copied to the clipboard? A plain list of names separated by comma (filename1, filename2, filename3)? Can you please elaborate? Hi Carlos, Actually I do not use the option for copying multiple items - my job's workflow require copying only one item name at time. But I'd like to share with others and I understand some would like to copy multiple items. Copying names now give each item name in new line, but I think your idea to make them be separated with comma could be good. Question is, are you able to help with this? It doesn't even have to be written in AppleScript. And thanks in advance. Link to comment
mcskrzypczak Posted April 12, 2013 Author Share Posted April 12, 2013 I've updated my workflow to v 1.1. More info in first post => http://www.alfredforum.com/topic/1733-updated-04122013-file-action-copy-folderfile-name-v-11/?p=8879 Link to comment
Carlos-Sz Posted April 13, 2013 Share Posted April 13, 2013 (edited) Hi Carlos, Actually I do not use the option for copying multiple items - my job's workflow require copying only one item name at time. But I'd like to share with others and I understand some would like to copy multiple items. Copying names now give each item name in new line, but I think your idea to make them be separated with comma could be good. Question is, are you able to help with this? It doesn't even have to be written in AppleScript. And thanks in advance. Hi, Note that the version I have tweaked will overwrite yours: download I tried to explain almost each line of the script. If you have any questions let me know. Edited April 13, 2013 by Carlos-Sz Link to comment
mcskrzypczak Posted April 22, 2013 Author Share Posted April 22, 2013 Hi, Note that the version I have tweaked will overwrite yours: download I tried to explain almost each line of the script. If you have any questions let me know. First of all, sorry for such late respond… To much to do, but so little time. Carlos, your version is exactly what I was intended my workflow to do! It’s clearly commented, so I was also able to learn something new. Wouldn’t you mind if I will update my first post for your link as the new version? And one more time, great thanks for help! Link to comment
Carlos-Sz Posted April 22, 2013 Share Posted April 22, 2013 First of all, sorry for such late respond… To much to do, but so little time. Carlos, your version is exactly what I was intended my workflow to do! It’s clearly commented, so I was also able to learn something new. Wouldn’t you mind if I will update my first post for your link as the new version? And one more time, great thanks for help! Yes, you can update. I’m glad I could help you. Link to comment
Dellu Posted April 6, 2014 Share Posted April 6, 2014 Yes, you can update. I’m glad I could help you. I am constantly using this workflow as File action and I love it. But, for some reason, the hotkey is not working for me. Did I missed sth? What I am doing is 1. search a file in Afred 2. select the file and inside Alfred itself and 3. hit the hotkey (CTR+Shit+CMD, in my case) without leaving Afred. But, the file name is not being copied. Link to comment
Carlos-Sz Posted April 6, 2014 Share Posted April 6, 2014 I am constantly using this workflow as File action and I love it. But, for some reason, the hotkey is not working for me. Did I missed sth? What I am doing is 1. search a file in Afred 2. select the file and inside Alfred itself and 3. hit the hotkey (CTR+Shit+CMD, in my case) without leaving Afred. But, the file name is not being copied. The hotkey was made to be used outside Alfred: 1. Select file(s) in Finder 2. Hit the hotkey Now you should see a notification and the filenames will be ready to be pasted. Link to comment
Dellu Posted April 7, 2014 Share Posted April 7, 2014 The hotkey was made to be used outside Alfred: 1. Select file(s) in Finder 2. Hit the hotkey Now you should see a notification and the filenames will be ready to be pasted. Well, that misses the whole point of simplicity and speed. isn't there a way to hit the hotkeys without leaving Alfred? thanks for the fast reply, by the way. Link to comment
Carlos-Sz Posted April 7, 2014 Share Posted April 7, 2014 If you are in Alfred I'm afraid you have to use file action. However, I think you have to suggest such feature: hotkey+Alfred selection like hotkey+OSX selection that we already have. Well, that misses the whole point of simplicity and speed. isn't there a way to hit the hotkeys without leaving Alfred? thanks for the fast reply, by the way. Link to comment
mcskrzypczak Posted April 7, 2014 Author Share Posted April 7, 2014 I have updated my workflow to versions 1.5 and 1.1.1 (kudos for Carlos Sz). Read desription in the first post → click. Link to comment
mcskrzypczak Posted April 7, 2014 Author Share Posted April 7, 2014 (edited) I am constantly using this workflow as File action and I love it. But, for some reason, the hotkey is not working for me. Did I missed sth? What I am doing is 1. search a file in Afred 2. select the file and inside Alfred itself and 3. hit the hotkey (CTR+Shit+CMD, in my case) without leaving Afred. But, the file name is not being copied. Hi Dellu. First of all I am glad you like my workflow, I am too using it commonly. As of your problem – the workflow is working with specified by user shortcuts inside Alfred. Don't know why it does not in your case. Am I understand it right that you set: Ctrl+Shift+Cmd+, If so, I have checked it and it works properly. The hotkey was made to be used outside Alfred: 1. Select file(s) in Finder 2. Hit the hotkey Now you should see a notification and the filenames will be ready to be pasted. Unfurtunatelly (but happily) what you are writing is slightly wrong Carlos. Workflow shortcut will work not only outside Alfred (in Finder, PathFinder, Forklift, open file dialogue windows, etc.) but also inside Alfred window which is when normally searching files (using "spacebar+search phrase" by default) or in Alfred-File-Browser. I am using this ability very often so I am 100% sure about this. Edited April 7, 2014 by Maciej Skrzypczak Carlos-Sz 1 Link to comment
Dellu Posted April 7, 2014 Share Posted April 7, 2014 Hi Dellu. First of all I am glad you like my workflow, I am too using it commonly. As of your problem – the workflow is working with specified by user shortcuts inside Alfred. Don't know why it does not in your case. Am I understand it right that you set: Ctrl+Shift+Cmd+, If so, I have checked it and it works properly. Unfurtunatelly (but happily) what you are writing is slightly wrong Carlos. Workflow shortcut will work not only outside Alfred (in Finder, PathFinder, Forklift, open file dialogue windows, etc.) but also inside Alfred window which is when normally searching files (using "spacebar+search phrase" by default) or in Alfred-File-Browser. I am using this ability very often so I am 100% sure about this. Thank you Maciej. It is working now. the problem was how I make the selection in Afred. What have you changed in the new version? the earlier version (1.1) was hiding the extension; sth that I like. the new version seems to include the file extension. I will stick with the older version for now. I am using it to develop a rather more advanced workflow using Keyboard Maestro for citing references inside a MultimMarkdown document. Great workflow, thank you guys Cheers Link to comment
mcskrzypczak Posted April 7, 2014 Author Share Posted April 7, 2014 Thank you Maciej. It is working now. the problem was how I make the selection in Afred. What have you changed in the new version? the earlier version (1.1) was hiding the extension; sth that I like. the new version seems to include the file extension. I will stick with the older version for now. I am using it to develop a rather more advanced workflow using Keyboard Maestro for citing references inside a MultimMarkdown document. Great workflow, thank you guys Cheers Everything is described in the first post. To get rid of extension you need to edit workflow – in Run Script delete „#” in #filename=${filename%.*} Link to comment
Carlos-Sz Posted April 7, 2014 Share Posted April 7, 2014 ... Unfurtunatelly (but happily) what you are writing is slightly wrong Carlos. Workflow shortcut will work not only outside Alfred (in Finder, PathFinder, Forklift, open file dialogue windows, etc.) but also inside Alfred window which is when normally searching files (using "spacebar+search phrase" by default) or in Alfred-File-Browser. I am using this ability very often so I am 100% sure about this. I got it working. I was selecting a file in Alfred (which leads to file action) and not only highlighting it. I was not aware that it was possible anyway. Link to comment
Steve Hardin Posted August 5, 2014 Share Posted August 5, 2014 Hi, I'm trying to use this workflow, and I think I have a conceptual gap. -select file in finder -use hotkey alfred should open up where i can type the folder to move file to Is this how it is suppose to work? Link to comment
mcskrzypczak Posted August 5, 2014 Author Share Posted August 5, 2014 Hi, I'm trying to use this workflow, and I think I have a conceptual gap. -select file in finder -use hotkey alfred should open up where i can type the folder to move file to Is this how it is suppose to work? Hi! The purpose of this workflow is to just copy the name of selected file or folder. Its name is stored in system clipboard so you can paste it anywhere you want. What you write can be achieved by default Alfred action. You can find and set it keyboard shortcut in Features → File Search → Actions → File Selection. Then, by selecting file/folder you can make some actions over them. Link to comment
Steve Hardin Posted August 7, 2014 Share Posted August 7, 2014 Hi! The purpose of this workflow is to just copy the name of selected file or folder. Its name is stored in system clipboard so you can paste it anywhere you want. What you write can be achieved by default Alfred action. You can find and set it keyboard shortcut in Features → File Search → Actions → File Selection. Then, by selecting file/folder you can make some actions over them. Thanks! Link to comment
politicus Posted August 18, 2014 Share Posted August 18, 2014 Great workflow. Thanks for sharing! Link to comment
mcskrzypczak Posted August 20, 2014 Author Share Posted August 20, 2014 Great workflow. Thanks for sharing! Really glad you like it! Link to comment
mcskrzypczak Posted March 29, 2017 Author Share Posted March 29, 2017 Version 1.6 is here! Once more I rewrote it (this time in Python) and now it supports multiple file/folder names copying! Download from here (link also in first post). Link to comment
Dellu Posted March 30, 2017 Share Posted March 30, 2017 Thank you. This workflow is one of all time favorites. I use it everyday. Link to comment
Savely Posted September 27, 2017 Share Posted September 27, 2017 (edited) On 3/29/2017 at 11:23 PM, mcskrzypczak said: Version 1.6 is here! Once more I rewrote it (this time in Python) and now it supports multiple file/folder names copying! Download from here (link also in first post). excuse me, but now (in new version 1.6) how to copy file names without an extension? please help. it is very necessary that it look like this: file1 file2 file3 or: folder1 folder2 folder3 Edited September 27, 2017 by Savely Link to comment
goforcarrrlos Posted August 22, 2018 Share Posted August 22, 2018 Hello, all! This incredibly time saving and efficient workflow sadly looks to be incompatible with Mac OS Mojave. Of course, Mojave is still in beta, so I understand some functions will be sort of wonky, but I thought I might try posting to this forum looking for assistance just in case. Is anyone else running this workflow successfully on Mojave? Is there an amendment that needs to be made in Alfred preferences? Thank you!! 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