@tig said:
The initial part of the code snippet
togo=" - 3D - johnsmith_google_com level 1";
specifies which string will be deleted in the components' names.
I you example:
"4_ Light Fixture - 4_ Light Fixture-1847101- 3D - johnsmith_google_com level 1-01" "4_ Light Fixture - 4_ Light Fixture-1847101- 3D - johnsmith_google_com level 1-02"
etc
become
"4_ Light Fixture - 4_ Light Fixture-1847101-01" "4_ Light Fixture - 4_ Light Fixture-1847101-02"
etcJust edit that to cover what you want to delete...
So to leave the final 'ref' as say "1-01", you simply change thetogo
to say:
togo=" - 3D - johnsmith_google_com level";
and the renaming is then:
"4_ Light Fixture - 4_ Light Fixture-1847101 1-01" "4_ Light Fixture - 4_ Light Fixture-1847101 1-02"
etcYou choose what's to be deleted...
You can always run the code a second time with a newtogo
string, e.g.
togo="4_ Light Fixture - ";
Would strip off the duplicated starting reference, leaving:
"4_ Light Fixture-1847101 1-01" "4_ Light Fixture-1847101 1-02"
etc
This worked beautifully!!! thank you much appreciated