drewThomasson commited on
Commit
290440b
1 Parent(s): 69776ee

made move instead of copy

Browse files
Files changed (1) hide show
  1. import_local_tts_models.py +4 -7
import_local_tts_models.py CHANGED
@@ -8,15 +8,12 @@ destination_dir = '/home/user/.local/share/tts/'
8
  # Create destination directory if it doesn't exist
9
  os.makedirs(destination_dir, exist_ok=True)
10
 
11
- # Copy all contents from source to destination
12
  for item in os.listdir(source_dir):
13
  source_path = os.path.join(source_dir, item)
14
  destination_path = os.path.join(destination_dir, item)
15
 
16
- # Copy files or directories
17
- if os.path.isdir(source_path):
18
- shutil.copytree(source_path, destination_path, dirs_exist_ok=True)
19
- else:
20
- shutil.copy2(source_path, destination_path)
21
 
22
- print("Contents copied successfully.")
 
8
  # Create destination directory if it doesn't exist
9
  os.makedirs(destination_dir, exist_ok=True)
10
 
11
+ # Move all contents from source to destination
12
  for item in os.listdir(source_dir):
13
  source_path = os.path.join(source_dir, item)
14
  destination_path = os.path.join(destination_dir, item)
15
 
16
+ # Move files or directories
17
+ shutil.move(source_path, destination_path)
 
 
 
18
 
19
+ print("Contents moved successfully.")