QQ聊天

帮一个朋友写的查找文件的Maxscript函数

Fn GetAllFiles inputPath inputFilterList outArray:#() =
(
    directories = GetDirectories (inputPath + "*")
    if directories.count > 0 do 
    for tempPath in directories do
    (
        GetAllFiles tempPath inputFilterList outArray:outArray
    )
    for tempFilter in inputFilterList do
    (
        tempFiles = GetFiles (inputPath + tempFilter)
        for tempFile in tempFiles do append outArray tempFile
    )
    outArray
)

print (GetAllFiles "d:\\" #("*.bmp","*.jpg"))
    

 

posted @ 2013-02-19 13:40  SITT  阅读(755)  评论(0编辑  收藏  举报
QQ聊天