Ejemplo: Python elimina carpetas vacías
import os
def drop_empty_folders(directory):
"""Verify that every empty folder removed in local storage."""
for dirpath, dirnames, filenames in os.walk(directory, topdown=False):
if not dirnames and not filenames:
os.rmdir(dirpath)
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)