quick, ugly and untested :p Code: global proc randomTY() { string $list[] = `ls -tr -sl`; int $size = size($list), $i; if ($size > 0) for($i = 0; $i < $size; $i++) setAttr ($list[$i] + ".ty") (rand(1,9)); } Copy-paste that in a text editor, save it as randomTY.mel under your script folder. Type source randomTY.mel in the command line (this needs to be done only once). Then you can just select objects and type randomTY; on the command line.