-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate_bundle.py
More file actions
27 lines (23 loc) · 886 Bytes
/
migrate_bundle.py
File metadata and controls
27 lines (23 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import shutil
import os
def copy_tree(src, dst):
if not os.path.exists(dst):
os.makedirs(dst)
for item in os.listdir(src):
s = os.path.join(src, item)
d = os.path.join(dst, item)
if os.path.isdir(s):
if item != '__pycache__':
copy_tree(s, d)
else:
shutil.copy2(s, d)
print(f"Copied {item}")
# 1. Copier le code
src_code = '/Users/mehdiwhb/Desktop/HAWRA/HAWRA_SUBMISSION_BUNDLE/02_codebase/'
dst_code = '/Users/mehdiwhb/Desktop/HAWRA/HAWRA_SUBMISSION_BUNDLE_2025_12_21/02_Code/'
copy_tree(src_code, dst_code)
# 2. Copier les figures
src_figs = '/Users/mehdiwhb/Desktop/HAWRA/HAWRA_SUBMISSION_BUNDLE/01_manuscript/figures/'
dst_figs = '/Users/mehdiwhb/Desktop/HAWRA/HAWRA_SUBMISSION_BUNDLE_2025_12_21/01_Manuscript/figures/'
copy_tree(src_figs, dst_figs)
print("Migration complete.")