如何删除和拷贝一个文件 python

如题所述

copyFiles(sourceDir, targetDir):
2 if sourceDir.find(".svn") > 0:
3 return
4 for file in os.listdir(sourceDir):
5 sourceFile = os.path.join(sourceDir, file)
6 targetFile = os.path.join(targetDir, file)
7 if os.path.isfile(sourceFile):
8 if not os.path.exists(targetDir):
9 os.make
温馨提示:答案为网友推荐,仅供参考