# Component name mismatching during component save

**URL:** <https://forums.sketchup.com/t/component-name-mismatching-during-component-save/136023>\
**Category:** SketchUp\
**Created:** [September 11, 2020, 9:13pm UTC](https://forums.sketchup.com/t/component-name-mismatching-during-component-save/136023 "2020-09-11T21:13:09Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [September 12, 2020, 7:10am UTC](https://forums.sketchup.com/t/component-name-mismatching-during-component-save/136023/9 "2020-09-12T07:10:28Z")

</div>

A component definition has two properties, the Path from which it has been loaded and the Name. Renaming the name does not affect the ‘Save As’ feature automatically.  
(There was a fix in version 5~6, I believe, that dealt with inserting components with the same (file)name).  
I believe it is by design, otherwise, the risk of self-referencing is too high.

Workarounds are, ‘Save collection’ , then iterate through that folder and alter the names of the files and then use this script:

> [@\[Code\] Example: Command to iterate a folder of Components and set their name property](https://forums.sketchup.com/t/code-example-command-to-iterate-a-folder-of-components-and-set-their-name-property/114047):
>
> Example: Command to iterate a folder of Components and set their name property. SketchUp version 2015+ [RenameComponentsByFolder.rb](https://forums.sketchup.com/uploads/short-url/bKarKHKLw8wFCqx6YVcKfcQ64j.rb) (5.4 KB) BACKUP YOUR FOLDERS BEFORE RUNNING THIS UTILITY! THIS IS AN EXAMPLE. NO WARRANTY EXPRESSED OR IMPLIED. Choose a folder of components and this utility will use the filename to generate a component name property. If the name property is not empty and you’ve chosen to manually edit names, then you’ll be prompted whether you wish to replace it. If you ch…

USE AT OWN RISK…

---

_[View the full topic](https://forums.sketchup.com/t/component-name-mismatching-during-component-save/136023)._
