I'm working on some Python code. I want to remove the new_folder
including all its files at the end of program.
Can someone please guide me how I can do that? I have seen different commands like os.rmdir but it only removes the path. Here is my code:
for files in sorted(os.listdir(path)):
os.system("mv "+path+" new_folder")`
The code above will move a folder (called check) into new_folder. I want to remove that check folder from the new_folder.