目标 | 使用此命令 |
---|---|
更改当前工作目录。 |
chdir “path” |
在目录中返回文件名的数组。 |
getFileList |
创建新目录。 |
sysFile -makeDir “dirname” |
例如:
// List the contents of the user's projects directory getFileList -folder `internalVar -userWorkspaceDir`; // Store all MEL files in the user's script directory // in an array variable string $scriptDir = `internalVar -userScriptDir`; string $scripts[] = `getFileList -folder $scriptDir -filespec "*.mel"`; // Create a new directory path sysFile -makeDir "C:/temp/mayaStuff"; // Windows sysFile -makeDir "/tmp/mayaStuff"; // Unix