This should work for you... string $sel[] = `ls -sl`; for($i=0;$i<size($sel);$i++){ setAttr ($sel[$i] + ".primaryVisibility") 0; } Just select all your objects and run the code. Chris