fileRootPath = r'a/b/c/d/' if any(name.endswith(('.mp4')) for name in os.listdir(fileRootPath): print(fileName + ' DLC results file exists') log(logpath, fileName + ' DLC results file exists') return