Extracting Maya Icons

I just want to add a quick addendum to the code above as it wasn’t working for 2015 and there is no information really anywhere on how to extract these well.


from pymel.core import *
for item in resourceManager(nameFilter='*'):
    try:
        #Make sure the folder exists before attempting.
        resourceManager(saveAs=(item, "C:/temp/icons/{0}".format(item)))    
    except:
        #For the cases in which some files do not work for windows, name formatting wise. I'm looking at you 'http:'!
        print item

Before, without the nameFilter argument, calling to the resource manager with no argument would return none.