Initial commit

This commit is contained in:
michaela.buzalkova
2025-09-30 08:22:44 +02:00
commit b45a8b2d00
29 changed files with 1486 additions and 0 deletions

19
EmptyFolders.py Normal file
View File

@@ -0,0 +1,19 @@
import os
cesta=r"u:\d1"
folders=[]
for root,dirs,files in os.walk(cesta):
for dir in dirs:
folders.append(os.path.join(root,dir))
print(folders)
sorted_list = sorted(folders, key=len, reverse=True)
print(sorted_list)
for item in sorted_list:
if len(os.listdir(item)) == 0:
print(item)
os.rmdir(item)