0

I have a servicemenuitem for KDE which copies the selected file to the desktop.

It works when one file is selected on the desktop, but when multiple files are selected, they are not copied.

The -exec parameter "%F has a list of all files and their full paths in, but I don't know how to get this to work with the -cp command.

Thanks

[Desktop Action copytodesktop]
Exec=cp "%F" /home/acer1/Desktop
Name=Copy To Desktop
Icon=document-send
 

[Desktop Entry]
Actions=copytodesktop
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Type=Service
X-KDE-Priority=TopLevel
AliC
  • 1
  • 1
  • 2
  • Just speculation... The problem may be that copying a number of files would require a command such as `cp "file1" "file2" "file3" destination_dir` while your `Exec` command would result in a command such as `cp "file1 file2 file3" destination_dir`. That is, it may be that "%F" for multiple selected files is being taken as one big file name. Since a file of that name isn't found, it doesn't work. May need to write a script to parse "%F" and call an appropriate copy command. – David Yockey May 10 '21 at 12:02
  • Thanks - that seems to be why – AliC May 10 '21 at 16:52

0 Answers0