This repository contains a Python script and standalone apps for macOS and Windows to help you organize your pictures by date, with additional options for folder management.
-
Download the App
-
Run the App
- Follow the prompts to select your desired option:
- Flatten Folders Structure: Extracts all pictures from subfolders into the main folder and deletes the original folders.
- Organize Files: Creates new folders based on the picture's date and moves the files into the appropriate folders.
- Rename Duplicates: If disabled, duplicate pictures will be replaced. If enabled, duplicates will be renamed to avoid overwriting.
- Follow the prompts to select your desired option:
-
Set Directory Path
Modify thedirectory
variable in the script to point to the absolute path of your target folder. For example:directory = '/path/to/your/folder'
-
Run the Script
Execute the script to organize your files:python organize_files_by_date.py
Before:
/picturesByFolder/
├── Folder1/
│ └── IMG_20231110.jpg
├── Folder2/
└── DSC_20231109.png
After:
/picturesByFolder/
├── IMG_20231110.jpg
├── DSC_20231109.png
Before:
/picturesByFolder/
├── IMG_20231110.jpg
├── DSC_20231109.png
├── notes.txt
After:
/picturesByFolder/
├── 20231110/
│ └── IMG_20231110.jpg
├── 20231109/
│ └── DSC_20231109.png
├── zero/
└── notes.txt
If this option is enabled, duplicate files will be replaced. If disabled, duplicates will be renamed (e.g., IMG_20231110(1).jpg
).
- Python 3.x
- Standard libraries:
os
,shutil
,re
- Ensure you have write permissions for the specified directory.
- This solution is ideal for organizing large collections of files, such as media or logs, by embedding a date-based folder structure for easier management.