The names are actually meaningful, and component#1 where an example, but I understand.
I think about this to get them right, I ment to get them equal with the file name ( or visa versa maybe better ). ( My knowledge about array iteration and getting the file list of the dir is minimal. Just started this morning with ruby and SU )
file_arr = List of "Components/PP50/" files
path = Sketchup.find_support_file file_arr[ind], "Components/PP50/"
component_definition = Sketchup.active_model.definitions.load path
name = component_definition.name=file_arr[ind]
However, What will happening with the underlaying component inside a component? Little scare about that. << to myself