sysFile コマンドを使用して、ファイルに関する共通のファイル システム操作を実行し ます。
| 目的 | 使用するコマンド | 
|---|---|
| ファイルを削除する | sysFile -delete "ファイル名" | 
| ファイル名を変更する | sysFile -rename "ファイル名" "新しいファイル名" | 
| ファイルを移動する | sysFile -move "ファイル名" "新しいファイル名" (rename と同じ) | 
| ファイルをコピーする | sysFile -copy "ファイル名" "新しいファイル名" | 
// Move a scene to the new directory (we can rename it at the same time). sysFile -rename "C:/temp/mayaStuff/myScene.mb.trash" "C:/maya/projects/default/scenes/myScene.mb"; // Windows sysFile -rename "/tmp/mayaStuff/myScene.mb.trash" "/maya/projects/default/scenes/myScene.mb"; // Unix // Rename the scene to "myScene.will.be.deleted" sysFile -rename "C:/temp/mayaStuff/myScene.will.be.deleted" "C:/temp/mayaStuff/myScene.mb.trash"; // Windows sysFile -rename "/tmp/mayaStuff/myScene.will.be.deleted" "/tmp/mayaStuff/myScene.mb.trash"; // Unix // Copy a scene to the new directory string $destWindows = "C:/temp/mayaStuff/myScene.mb.trash"; string $srcWindows = "C:/maya/projects/default/scenes/myScene.mb"; sysFile -copy $destWindows $srcWindows; // Windows string $destUnix = "/tmp/mayaStuff/myScene.mb.trash"; string $srcUnix = "maya/projects/default/scenes/myScene.mb"; sysFile -copy $destUnix $srcUnix; // Unix // Delete the scene sysFile -delete "C:/temp/mayaStuff/myScene.will.be.deleted"; // Windows sysFile -delete "/tmp/mayaStuff/myScene.will.be.deleted"; // Unix
file コマンドを使用すると、ファイル(File)メニューのさまざまな機能(ファイルやリファレンスとその内容の操作やファイルの検証)を実行することができます。
MEL リファレンスの file のページを参照して、オプションの一覧を確認してください。