How to run CopyFile, CopyURIs, MoveURIs methods of Nemo File Manager

68 Views Asked by At

Under org.Nemo.FileOperations there are methods named: CopyFile, CopyURIs, MoveURIs. How can I use these methods (i am looking for cli commands which use dbus-send or any equivalent)?

Nemo Dbus

1

There are 1 best solutions below

4
ukBaz On BEST ANSWER

You have used D-Feet to get all the information you need so I assume you are struggling to find the correct command line syntax.

I personally find busctl the easier command line syntax.

An example of copying a file using busctl would be:

busctl --user call org.Nemo /org/Nemo org.Nemo.FileOperations CopyFile ssss file:$HOME/Downloads/test.txt test.txt file:$HOME/Downloads test2.txt

To do the same with dbus-send would be:

dbus-send --session --dest=org.Nemo --print-reply /org/Nemo org.Nemo.FileOperations.CopyFile string:file:$HOME/Downloads/test.txt string:file:test.txt string:file:$HOME/Downloads string:test3.txt

The CopyURIs and MoveURIs take an array of URIs as the first argument and a destination directory as the second argument. So an example of doing that with busctl would be:

busctl --user call org.Nemo /org/Nemo org.Nemo.FileOperations CopyURIs ass 2 file:$HOME/Downloads/test.txt file:$HOME/Downloads/test2.txt file:$HOME

The main thing with an array is that you have to include the number of how long the array is. In this example 2