from pathlib import Path pairs = [ (r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/ai-dop-platform/legacy-demo/frontend/src/data/homeModulesSync.js", r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/Web/src/views/dashboard/data/homeModulesSync.ts"), (r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/ai-dop-platform/legacy-demo/frontend/src/data/s2Kpis.js", r"d:/Projects/Ai-DOP/SourceCode/references/Admin.NET/Web/src/views/dashboard/data/s2Kpis.ts"), ] for s,d in pairs: src=Path(s); dst=Path(d); dst.parent.mkdir(parents=True, exist_ok=True) t=src.read_text(encoding='utf-8') dst.write_text(t,encoding='utf-8') print(dst)