Python 判断文件夹下 是否存在某种类型的文件
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
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