planet_rag_api / move.py
abdallah110's picture
Create move.py
f7e86c5 verified
raw
history blame contribute delete
492 Bytes
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}'")