File size: 681 Bytes
0d8f467
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
import shutil

# Define source and destination directories
source_dir = 'tts_models'
destination_dir = '/home/user/.local/share/tts/'

# Create destination directory if it doesn't exist
os.makedirs(destination_dir, exist_ok=True)

# Copy all contents from source to destination
for item in os.listdir(source_dir):
    source_path = os.path.join(source_dir, item)
    destination_path = os.path.join(destination_dir, item)
    
    # Copy files or directories
    if os.path.isdir(source_path):
        shutil.copytree(source_path, destination_path, dirs_exist_ok=True)
    else:
        shutil.copy2(source_path, destination_path)

print("Contents copied successfully.")