os
os.remove(file)
os.rmdir(path) # empty folder
shutil
shutil.copyfile(src, dst) # file
shutil.copytree(src, dst) # folder, can be not empty
shutil.rmtree(src, dst) # folder, can be not empty
os.remove(file)
os.rmdir(path) # empty folder
shutil.copyfile(src, dst) # file
shutil.copytree(src, dst) # folder, can be not empty
shutil.rmtree(src, dst) # folder, can be not empty
本文标题:Python: 文件夹操作
本文链接:https://www.haomeiwen.com/subject/growvftx.html
网友评论