shutil.rmtree() means to recursively delete all subfolders and subfiles under the folder.
So if you want to delete a folder under E drive, you can use
shutil.rmtree('E:\\myPython\\image-filter\\test', ignore_errors=True)This way all files in the test folder (including test itself) are deleted and errors are ignored.