Imagine I copied several files in Nautilus to paste them somewhere else; how could I obtain the list of copied filenames to, for example, use it in a script?
File paths marked for copying in Nautilus are automatically passed to the clipboard. You should be able to paste the paths in a text editor of your choice without any problem.
If you want to process the files in a terminal window you will have to select Paste Filenames in the right-click context menu.
Another way to pass file paths as arguments from Nautilus is to simply drag and drop the selected items into the terminal. The paths will automatically be quoted and escaped correctly.
As far as scripts are concerned: Utilities like
xsel (install with:
sudo apt-get install xsel) allow you to programmatically parse clipboard contents, if that's what you are asking for. To get the contents of the clipboard you can use
xsel -b, e.g.:
for i in "$(xsel -b)"; do echo "$i" done