forked from gamberoillecito/QuantumEngPolitoNotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetObsidian.py
More file actions
24 lines (19 loc) · 745 Bytes
/
setObsidian.py
File metadata and controls
24 lines (19 loc) · 745 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
import os
import shutil
def copy_obsidian_settings():
# Source folder (.obsidian)
source_folder = "SharedObsidianSettings/.obsidian"
# Destination folder (content folder)
destination_folder = os.path.join(os.getcwd(), "content/.obsidian")
# Ensure the source folder exists
if not os.path.exists(source_folder):
print(f"Error: Source folder '{source_folder}' not found.")
return
try:
# Copy the entire .obsidian folder to content folder
shutil.copytree(source_folder, destination_folder, dirs_exist_ok=True)
print("Settings copied successfully.")
except Exception as e:
print(f"Error: {e}")
# Run the function to copy Obsidian settings
copy_obsidian_settings()