0. 환경
windows
python3.6
1. 전체 폴더 삭제
import shutil
your_want_rm_path = “E:/data/1/”
shutil.rmtree(your_want_rm_path, ignore_errors=True)
2. 파일 삭제
import os
old_file = “E:/data/1/1.txt”
os.remove(old_file)
windows
python3.6
import shutil
your_want_rm_path = “E:/data/1/”
shutil.rmtree(your_want_rm_path, ignore_errors=True)
import os
old_file = “E:/data/1/1.txt”
os.remove(old_file)