Maya Mel - Change textures path and export fbx


#1

for( $i=0; $i<500; $i++ )
{
//setAttr -type “string” file7.fileTextureName $Texture_array[$i];
setAttr -type “string” file8.fileTextureName $Back_Texture[$i];
string $files[] = ls -type "file";

for ( $file in $files )
{
	string $fileName = `getAttr ( $file + ".fileTextureName" )`;
	catch(AEfileTextureReloadCmd ( $file + ".fileTextureName" ));
	
}

file -force -options “v=0;” -typ “FBX export” -pr -es $FileName_array[$i];
}

Having issue it overrides same texture fom both files… What I am doing wrong