Go to: Synopsis. Return value. Related. Flags. Python examples.
getFileList([filespec=string], [folder=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
getFileList is undoable, queryable, and editable.
string[] an array of file names
In query mode, return type is based on queried flag.
Long name (short name) | argument types | Properties | ||
---|---|---|---|---|
folder(fld)
|
string
|
![]() |
||
|
||||
filespec(fs)
|
string
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # List the contents of the user's projects directory # cmds.getFileList( folder=cmds.internalVar(userWorkspaceDir=True) ) # List all MEL files in the user's script directory # cmds.getFileList( folder=cmds.internalVar(userScriptDir=True), filespec='*.mel' )