Jump to content

Recommended Posts

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 by mcskrzypczak
New workflow version
Link to comment
  • 2 weeks later...

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

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 by Carlos-Sz
Link to comment
  • 2 weeks later...

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
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
  • 11 months later...

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

 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

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

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

 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 by Maciej Skrzypczak
Link to comment

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

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

...

 

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
  • 3 months later...

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

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
  • 2 weeks later...
  • 5 months later...
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 by Savely
Link to comment
  • 10 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...