How to automatically change relative paths in references

Hi,

I have several files with a several references in each file. Unfortunately they haven't got "relative path".  

Can anybody advise me how to automatically change relative paths in references?

I'm searching command to do it but I can't find. Is there any simple solution?

thanks in advance!