PDA

View Full Version : Renaming script help


allucore
12-01-2011, 10:56 PM
Hi all,

I'm still fairly new to Mel, so forgive me if I sound dumb.

What I want to do is create a renaming script that adds a letter to the name instead of a number. It should be simple but for my little knowledge it's kicking my @&$.

Here is what I have so far:

string $sel[] = `ls -sl`;

for ($each in $sel)

{

******* string $allLights = $each;

*******

******* string $alpha[26] = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K","L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };

******* string $newName;*******

******* for($i = 0; $i<size($alpha); $i++)

******* ******* {

******* ******* *******

******* ******** $newName = ("myLightName_" + $alpha[$i]);

******* *******

rename $allLights $newName;

*******

******* ******* }



Any help will be appreciated :buttrock:

******* *******

*******


******* *******

}

CGTalk Moderation
12-01-2011, 10:56 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.