Copy Path in Nautilus
I recently switched to Ubuntu. Starting to like it.
Here is my first Ubuntu/Nautilus hack. Put the following python script:
#!/usr/bin/python
import pygtk
pygtk.require('2.0')
import gtk
import os
# get the clipboard
clipboard = gtk.clipboard_get()
# set the clipboard text data
clipboard.set_text(os.environ['NAUTILUS_SCRIPT_SELECTED_FILE_PATHS'])
# make our data available to other applications
clipboard.store()
in the file:
~/.gnome2/nautilus-scripts/Copy Path
Now launch Nautilus, select any file(s) or folder(s) and invoke pop up menu and select Scripts:Copy Path. The fully qualified path(s) of the file(s) or folder(s) will be copied to the clipboard.
Does anyone know a better way?
Posted by sandipchitale
( Aug 25 2007, 12:15:00 PM PDT ) Permalink