Jump to content
sphardy

Can File Buffer Files be copied to Clipboard?

Recommended Posts

Hi

 

When adding files to the file buffer is it possible to copy the files to the clipboard so that I can then paste them into another application?

 

thanks

 

///sphardy

Share this post


Link to post

Hi - I'm looking for an option to copy the actual file(s). It appears for now that Alfred can only copy the file path to the clipboard

 

Unless you have disabled the action in preferences (Features->File Search->Actions) then the Copy To action should still be available for multiple items added to the buffer.

 

copyto.png

Share this post


Link to post

Yes, but Clipboard is not a destination I can copy to

 

I don't understand why you would need it to be. If you're copying the files, the only final outcome of that is to paste them somewhere else, which would be the same thing as just using the Copy To action.

Share this post


Link to post

Not if I want to past them into another app

 

Example: I've been consolidating a lot of data files into Evernote notebooks together with various text notes etc. Lots of copy & pasting from various sources that I could do almost entirely without resorting to mouse or trackpad if this option was supported

Share this post


Link to post

Like the suggestion, but doesn't pbcopy / pbpaste only work with text files? 

 

That said, I tried your suggestion using a workflow with a file action passing arguments to a script of: cat "{query}" | pbcopy

 

Didn't work with text or other files

 

Workflow I tried is here: http://sphardy.net/FsKu

Share this post


Link to post

Like the suggestion, but doesn't pbcopy / pbpaste only work with text files? 

 

That said, I tried your suggestion using a workflow with a file action passing arguments to a script of: cat "{query}" | pbcopy

 

Didn't work with text or other files

 

Workflow I tried is here: http://sphardy.net/FsKu

 

Alfred separates filenames with tabs. 'cat' doesn't understand tab separated filenames. The simplest approach is this:

 

 

echo "{query}" | sed -e 's/ /\\ /g' | xargs cat | pbcopy
 
Tell Alfred to escape double quotes and nothing else. This pipes the result through 'sed' to escape spaces, then through xargs to split out the arguments to cat.

Share this post


Link to post

Thanks again for the efforts - your suggestion works with text files, but not binaries, I guess due to the limitations of pbcopy

 

I'm wondering if the capability could be achieved via apple script, perhaps somehow calling finder to copy the files to the clipboard? 

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.

Guest
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...