标签:
python实现文件的copy
import shutil
shutil.copy(sourceDir, targetDir)
python删除文件可以用os模块的remove方法, 例如:
import os os.remove(‘/file/path/to/delete‘)
如果要把整个文件夹删掉,需要使用shutil模块的rmtree方法:
import shutil
shutil.rmtree(‘/dir/to/delete‘)
标签:
原文地址:http://www.cnblogs.com/jianyingzhou/p/4634738.html