They should have a unique id (name + extension/type). If they haven't you have a problem inside your data management. Creo need a unique identifier and uses for this the filename.
If you have problems with doubled files you can generate a unique ID by getting the hash value from the file or something like that.
Yah there has to be unique ID for each file (part,asm,drawing). As if now I have not found any.
I have tried ProMdlIdGet but it's not persistent between sessions.
If I generate my own unique ID then I will need to add/attach it as a property to the part (or asm/drawing) and later I have to write a fucntion which will return the Part for given unique id.
Pro toolkit is in use for so long and I am sure people must have faced this situation.