I tried to simplify but the actual error with the values is this:
error “Finder got an error: Can’t set name of file "Macintosh HD:Users:BColley:Library:CloudStorage:OneDrive-AAFP:Annals:2024:4.jul.aug 22.4:Production 22.4:velasquez:velasquezfig2.c.eps" to "279velasquezfig2.c.eps".” number -10006 from name of file “Macintosh HD:Users:BColley:Library:CloudStorage:OneDrive-AAFP:Annals:2024:4.jul.aug 22.4:Production 22.4:velasquez:velasquezfig2.c.eps”
The path that I see in the error message puts the file in the Library, so it may be protected from editing unless security requirements are met (especially if the script is actuall an ‘app’).
Can your script rename a file that is somewhere else? Like on the desktop?