Dolphin Plugin: Copy as path05 Mar 2015
I was missing the feature of
Copy File Path in Dolphin (KDE File Manager). So I created one by myself. You need
xclip installed for this.
Create a file named
copy-path.desktop in the following directory.
For KDE5, use the following directory (thanks to Peter).
Then add the following lines to the file
[Desktop Action copy-path] Exec=echo "%U" | tr -d '\n' | xclip -selection clipboard Name=Copy Path Icon=edit-copy [Desktop Entry] Actions=copy-path ServiceTypes=KonqPopupMenu/Plugin MimeType=all/all Type=Service X-KDE-Priority=TopLevel
I have added
tr command to trim the newline which may cause a forced return while pasting the text in a terminal.
Now reopen Dolphin. A top-level context menu named “Copy as path” should appear. Clicking it will copy the absolute name of the file to clipboard.
2017-02-21 EDIT: Now you can copy directory path also!