I have a nautilus script that generates an archive file based on the files selected in the nautilus window. This archive file is created in the
/tmp directory. I want a way to copy this file to the clipboard from the script, so that the user can just go to desktop or home directory and paste it.
I have tried doing this with
xsel, but they don't seem to replicate a file copying operation, rather they copy the contents of a file.
xclip -in -selection c generated-archive echo -n generated-archive | xsel --clipboard --input
Neither of them do what I need.
So, I want to know if this is possible, and if it is, how should I go about it?