Copying Uv's To Uv Sets For Multiple Objects

Hi there. I was wondering if any of you guys could help me in the right direction.. I want to copy UV's from one set to another (creating the new set at the same time) for multiple objects. IE: i dont want to merge them togheter, copy uvs and then separate since this will mess up my hierarchy and transformations.

Im a bit of a noob at mel so any help would be appreciated!

Is the main part of your problem the fact that you have multiple objects? If that's the case then you just have to make a for loop like this:

string $objname[]=ls-sl;
for( $i=0 ; $i<(size($objname)); ++$i){
select -r ($objname[$i]);
//Your uv set copying code here//
};
select -r ($objname);

ah thanks man that worked really well. my code ended up lookin like this

string $objname[]=ls-sl;
for( $i=0 ; $i<(size($objname)); ++$i){
select -r ($objname[$i]);
polyCopyUV -uvi "map1" -uvs "TexCoord1" -cm 1 -ch 1;
};
select -r ($objname);

right now im trying to replace "map1" with a default value so it copies from current UV set rather than map1 all the time. (not going to well heh)

again thanks man, appreciated!