ohh i see it now...so I can changefor both isFolderExcluded and isFileExcluded into something likeIf UCase(p.Name) = UCase(aryFiles(i)) Then Exit Functionif I wanted the complete path for each specific folder or specific file to be excluded....If UCase(p.path) = UCase(aryFiles(i)) Then Exit Function