Heya,
had this happen a lot..
hmmm..
you'll have to do some sort of recursive thing.. where you keep using the "ls" command to get a list of everything in the scene. Then you iterate through that list and find a name which has a "|" in it. If there's a "|" in the name, then you know that you've found something which matches another name within maya.
Then you can find out what the actual object name is by tokenizing that string by the "|"'s.. the last item in the tokenized list is the name you want to change.
Then you can just get a list of all each of those by doing a ls "*|name".. and then iterate through that and rename them to ("name_" + $x)..
then go back to the beginning and iterate through the whole thing again until there are no more names with "|" in them.
I think that would work..
-jason
jason schleifer
animator
weta digital