MEL Fileノードのパスを表示・入力

//Fileノードのパスを確認するためのツールウインドウです。
//ウインドウのサイズを10×10で作成した後に削除
string $window = `window -widthHeight 10 10`;
showWindow $window;
deleteUI -window $window;

//-------ウインドウ-------
window -fw -t "PATH" -rtf 1;
columnLayout -adjustableColumn true;

//文字
text -label "-------------------------------------------------PATH-------------------------------------------------" -align "center";
//テキストフィールド 入力場所をAと名付けます。
textField -editable true A;

//Readボタン 選択Fileノードのパスをテキストフィールドに表示
button -label "Read" -command "string $N001t=`getAttr .fileTextureName`;textField -e -tx $N001t A;";
//Startボタン 最初のFileノードのパスをテキストフィールドに表示
button -label "Start" -command "select `ls -type file`;string $namesA= `ls -sl`;int $i=0;select $namesA[0];string $N001t=`getAttr .fileTextureName`;textField -e -tx $N001t A;";
//Nexttボタン 次のFileノードのパスをテキストフィールドに表示
button -label "Next" -command "int $i=$i+1;select $namesA[$i];string $N001t=`getAttr .fileTextureName`;textField -e -tx $N001t A;";
//Prevボタン 前のFileノードのパスをテキストフィールドに表示
button -label "Prev" -command "int $i=$i-1;select $namesA[$i];string $N001t=`getAttr .fileTextureName`;textField -e -tx $N001t A;";
//Writeボタン テキストフィールドに入力したパスを選択Fileノードのパスに入力。
button -label "Write" -command "Select1;";
//ウインドウ表示
showWindow;

global proc Select1()
{
string $names= `ls -sl`;
string $N001a = `textField -query -text A`;
setAttr -type "string" ($names[0]+".fileTextureName") $N001a ;
};