File size: 613 Bytes
c49b21b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import os
import shutil
from pathlib import Path
def step0_move_old_merged():
"""
Move the old merged features file to data/merged/temp for later remerge and deletion.
"""
merged_dir = Path("data/merged/features")
temp_dir = Path("data/merged/temp")
temp_dir.mkdir(parents=True, exist_ok=True)
# Move all files from merged_dir to temp_dir
for f in merged_dir.glob("*"):
if f.is_file():
dest = temp_dir / f.name
print(f"[INFO] Moving {f} -> {dest}")
shutil.move(str(f), str(dest))
if __name__ == "__main__":
step0_move_old_merged()
|