Delete file and folder and subfolder python code example
Example 1: delete folder and its subfolders in python
import shutil
shutil.rmtree('/path/to/your/dir/')
Example 2: create batch file to delete folders and subfolders
Echo batch file to delete folder
@RD /S /Q "D:\testfolder"