Deleting directory in Python

后端 未结 6 626
既然无缘
既然无缘 2020-12-01 12:08

shutil.rmtree will not delete read-only files on Windows. Is there a python equivalent of \"rm -rf\" ? Why oh why is this such a pain?

6条回答
  •  执念已碎
    2020-12-01 12:42

    Here is a variant of what Steve posted, it uses the same basic mechanism, and this one is tested :-)

    What user do python scripts run as in windows?

提交回复
热议问题