Deleting all the files from the folder

PHOTO EMBED

Thu Nov 24 2022 13:57:45 GMT+0000 (Coordinated Universal Time)

Saved by @Mukil #python #removefiles #folder

for dirpath, dirnames, filenames in os.walk("./Test/"):
    # Remove regular files, ignore directories
    for filename in filenames:
        os.unlink(os.path.join(dirpath, filename))
content_copyCOPY