This is removing a Folder.

                          This Code Removing a 10 Folder.

                    This Code removing a 10 folder. Those folders create a back code.



#        Remove the 10 folders on the desktop
import os
import shutil

# Specify the path to your desktop
desktop_path = r'C:\Users\hp\OneDrive\Desktop' # you can change your path

for i in range(1, 10):
folder_name = f"Folder_{i}"
folder_path = os.path.join(desktop_path, folder_name)
shutil.rmtree(folder_path)

Comments

Popular posts from this blog

Binary to Number converter.

Python Tkinter QR Code Generator

color guessing game with GUI using python