Jump to content

Can File Buffer Files be copied to Clipboard?


Recommended Posts

  • 3 weeks later...

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

Link to comment

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.

Link to comment

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

Link to comment

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.
Link to comment

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? 

Link to comment
  • Vero locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...