Renaming a file adding it's size at the end fo the name

How can i batch rename files adding their size in kb at the end of the name string?
Thanks

The Finder has size and physical size properties for files. I’m pretty sure they give the size in bytes, but maybe you can manipulate those numbers to get the value in KB. As far as renaming, just make hidden extension true, get the displayed name, and then set the name to displayed name & fileSize & “.” & name extension. I think the name extension property returns the extension without the dot.