# Is it possible to get the file path to the .blend file that a linked object came from programmatically?

I am trying to find a list of all file paths that are appended/linked in a .blend file through the Blender API, I need to run a script in each appended/linked file to change materials so in turn the material would be changed in the source file.

Thanks for any help in advance.

Yes it is possible:

obj.library.filepath


Additionnally, a not linked object has an empty obj.library.