How to rename all files within an assembly using strings from custom properties and keep model/drawing references

Hello Guys,
I need to export files to my client and change all filenames to a mix of values from custom properties. I hoped #TASK could help. Unfortunately when I tried to rename files with export macro, the references between model and drawing broke (I need to use different prefix for each filetype). Any suggestions?

SolidworksImport/export