Go to: Synopsis. Return value. Related. Flags. MEL examples.
sysFile [-copy string] [-delete] [-makeDir] [-move string] [-removeEmptyDir] [-rename string]
string
sysFile is undoable, NOT queryable, and NOT editable.
This command provides a system independent way to create a directory
or to rename or delete a file.
boolean | True if successful, false otherwise. |
getFileList
copy, delete, makeDir, move, removeEmptyDir, rename
Long name (short name) |
Argument types |
Properties |
-delete(-del)
|
|
|
|
-rename(-ren)
|
string
|
|
|
Rename the file to the name given by the newFileName parameter.
|
|
-move(-mov)
|
string
|
|
|
Behaves identically to the -rename flag and remains for
compatibility with old scripts
|
|
-copy(-cp)
|
string
|
|
|
Copy the file to the name given by the newFileName paramter.
|
|
-makeDir(-md)
|
|
|
|
Create the directory path given in the parameter.
This will create the entire path if more than one
directory needs to be created.
|
|
-removeEmptyDir(-red)
|
|
|
|
Delete the directory path given in the parameter if
the directory is empty. The command will not delete a directory
which is not empty.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can be used more than once in a command.
|
// Create a new directory path
sysFile -makeDir "C:/temp/mayaStuff"; // Windows
sysFile -makeDir "/tmp/mayaStuff"; // Unix
// 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