1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| def handleAssetsFile(): sourceSrcDir = os.getcwd()+os.sep+"src/" dstSrcDir = os.getcwd()+os.sep+"tools/myProj/assets/src/" sourceResDir = os.getcwd()+os.sep+"res/" dstResDir = os.getcwd()+os.sep+"tools/myProj/assets/res/" if os.path.exists(dstSrcDir): print dstSrcDir, '存在先删除' shutil.rmtree(dstSrcDir) print '拷贝代码文件夹开始...' shutil.copytree(sourceSrcDir, dstSrcDir) print '拷贝代码文件夹结束!\n' if os.path.exists(dstResDir): print dstResDir, '存在先删除' shutil.rmtree(dstResDir) print '拷贝资源文件夹开始...' shutil.copytree(sourceResDir, dstResDir) print '拷贝资源文件夹结束!\n'
if __name__ == "__main__": handleVersionFile() handleAssetsFile()
|