Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

getFileList [-filespec string] [-folder string]

getFileList is undoable, NOT queryable, and NOT editable.

Returns a list of files matching an optional wildcard pattern. Note that this command works directly on raw system files and does not go through standard Maya file path resolution.

Return value

string[]an array of file names

Related

filetest, sysFile

Flags

filespec, folder
Long name (short name) Argument types Properties
-folder(-fld) string create
return a directory listing
-filespec(-fs) string create
wildcard specifier for search.

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.

MEL examples

// List the contents of the user's projects directory
//
getFileList -folder `internalVar -userWorkspaceDir`;
// List all MEL files in the user's script directory
//
getFileList -folder `internalVar -userScriptDir` -filespec "*.mel";