This README provides instructions on how to use the set of Python scripts designed for organizing media files (pictures and videos) and processing log files.
There are four main scripts:
- organize_pictures.py: Organizes picture files into folders based on their creation dates.
- organize_videos.py: Organizes video files into folders based on their creation dates.
- combine_log.py: Combines all log files from a log directory into a single file, categorizing entries into 'move' and 'duplicate' sections.
- duplicated_files.py: Processes log files to identify and handle duplicate files.
- Python 3.x installed.
exiftool
installed: This is used for extracting media file metadata. Install exiftool.- Libraries:
subprocess
,json
,tqdm
,datetime
,os
,shutil
. Most of these are standard in Python. You might need to installtqdm
usingpip install tqdm
.
Script: organize_pictures.py
This script organizes pictures into folders named by their creation dates.
-
Edit the script to specify the source and destination directories at the end of the file.
organize_photos('/path/to/source/pictures', '/path/to/destination/folder')
-
Run the script:
python organize_pictures.py
Script: organize_videos.py
Similar to organize_pictures.py
, but for video files.
-
Edit the script to specify the source and destination directories.
organize_videos('/path/to/source/videos', '/path/to/destination/folder')
-
Run the script:
python organize_videos.py
Script: combine_log.py
Combines all log entries into one file, with 'move' entries first, followed by 'duplicate' entries.
-
Edit the script to specify the log directory and the name of the output combined log file.
combine_log_files('/path/to/logs/directory', '/path/to/combined_log_file.txt')
-
Run the script:
python combine_log.py
Script: duplicated_files.py
Processes log files to identify and handle duplicate files.
-
Run the script (no modifications needed unless specific log processing is required).
python duplicated_files.py
- Always backup your media files before running these scripts to prevent accidental loss.
- Modify the paths in the scripts to match your directory structure.
- Ensure
exiftool
is installed and accessible from the command line.
For further assistance or customizations, refer to the comments within each script or contact the script maintainer.