使用 sysFile 命令来执行文件上的常用文件系统操作。
|
例如:
// 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)菜单执行各种功能、操纵文件和引用以及它们的内容的功能,以及测试文件函数的功能。
有关其选项的完整列表,请参见 file 的 MEL 参考页面。