Creating folders using sysFile command
sysFile -makeDir "/home/user/mayaFolder"; //unix sysFile -makeDir "C:/Documents and Settings/MayaFolder"; //windows
Get the list of mel scripts in the maya scripts directory
getFileList -folder "/home/user/maya/scripts" -filespec "*.mel";
Stripping a file path in to directory name and base name.
$filePath = "/home/user/maya/2011-x64/scripts/userSetup.mel"; $dirName = dirname($filePath); $baseName = basename($filePath , "/");
sysFile, dirname, basename
The sysFile command can be used to create, delete or rename files and directories from within Maya. The dirname and basename commands can be used to strip a file path in to the absolute path and filename. Using a combination of these three commands its possible to perform a variety of OS level operations from within the Maya workspace itself.