Nautilus copy from commandline

30. kesäkuuta 2012 klo 22.22
Sijainti: Muut: Launchpad
Avainsanat: Gnome, Nautilus

Apparently this is now supported; at least the following seems to work under 12.04:

$ qdbus org.gnome.Nautilus /org/gnome/Nautilus org.gnome.Nautilus.FileOperations.CopyFile "file:///source/directory" "*" "file:///destination/directory" "" 

where /source/directory is the absolute path to your source directory, * is the glob for file[s] to copy,/destination/directory is your destination directory and the last ”” is for destination file name. Note that you need to have the last one there even if it’s empty as in here, to fulfill the method signature. Also, if you specify a target name and have multiple source files, they’ll all get copied to that one destination file, giving an overwrite prompt for each file after the first one (which may or may not be what you want).

Vastaa viestiin sen kontekstissa (Launchpad)