import os import shutil import glob # الفولدر الجديد destination_folder = "diseases" os.makedirs(destination_folder, exist_ok=True) # لو مش موجود، ينشئه # البحث عن كل ملفات .txt في الفولدر الحالي txt_files = glob.glob("*.txt") # نقل كل ملف for file in txt_files: shutil.move(file, os.path.join(destination_folder, os.path.basename(file))) print(f"✅ تم نقل {len(txt_files)} ملف إلى '{destination_folder}'")