Photoshop脚本之获得文件夹下所有特定后缀文件

function getAllFiles(folderName,houzhui){
    folderName
    var regthis = new RegExp( '.+\.('+houzhui+')$','i');
    var inFolder = new Folder(folderName)
    var fileList = null
    if(inFolder != null){
        var fileList = inFolder.getFiles(regthis);
    }
    return fileList
} 

files = getAllFiles('dirPath','jpg')
files2 = getAllFiles('dirPath2','jpg|png')

 

posted @ 2017-01-13 17:12  Shiyu_Huang  阅读(606)  评论(0编辑  收藏  举报