pymel.core.system.getFileList

getFileList(*args, **kwargs)

Returns a list of files matching an optional wildcard pattern.

Flags:
Long name (short name) Argument Types Properties
filespec (fs) unicode ../../../_images/create.gif
 
wildcard specifier for search. Flag can have multiple arguments, passed either as a tuple or a list.
folder (fld) unicode ../../../_images/create.gif
 
return a directory listing

Derived from mel command maya.cmds.getFileList

Example:

import pymel.core as pm

# List the contents of the user's projects directory
#
pm.getFileList( folder=pm.internalVar(userWorkspaceDir=True) )
# Result: [u'.DS_Store', u'default', u'mydir', u'papervision'] #

# List all MEL files in the user's script directory
#
pm.getFileList( folder=pm.internalVar(userScriptDir=True), filespec='*.mel' )
# Result: [] #

Previous topic

pymel.core.system.fscanf

Next topic

pymel.core.system.getInputDeviceRange

Core

Core Modules

Other Modules

This Page