Copy a file's path in a library

The (different) commands in the default menus should work better for you: