Is there a script that will replace a shape with another shape?

 From:  stefano (LIGHTWAVE)
11945.13 
I was wondering - if the object is named - and i might be interested to
swap all 'object 1's - Circle" with 'object 2 - Square'
would that be an easy script?