Skip to content

Commit

Permalink
(fix) merge_folders.py oops
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerboy448 authored May 1, 2024
1 parent 13a4ab4 commit bb8b498
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion merge_folders.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import os
import shutil
import logging

# Setup logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')

def merge_directories(src, dst):
"""
Recursively merges directories from src to dst without overwriting existing files.
Expand Down Expand Up @@ -33,7 +40,7 @@ def atomic_moves(source_directories, target_directory):
except Exception as e:
logging.error(f"Error during moving process from {src}: {e}")

# Example use case (commented out for safety):
# Example use case (commented out for safety - remove "# " to uncomment):
# source_dirs = ['/mnt/data/media/tv-slade', '/mnt/data/media/tv-tmp']
# target_dir = '/mnt/data/media/tv'
# atomic_moves(source_dirs, target_dir)

0 comments on commit bb8b498

Please sign in to comment.