Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fileClassify_dateTaken

fileClassify_dateTaken is an interactive Python script that classifies files by their best available date while preserving the original source files.

Current version: 0.2.0

Requirements

  • Python 3
  • Pillow

Install Pillow with:

python -m pip install Pillow

Usage

Run:

python reclassify_datetaken.py

Enter or drag the source directory path when prompted.

Processing

The script:

  • processes regular, non-symlink files located directly inside the selected directory;
  • does not recurse into subdirectories;
  • groups files with identical stems;
  • attaches derivative stems to the longest matching base stem;
  • treats an immediate numeric continuation as a separate group;
  • reads these EXIF date fields from recognized images with Pillow:
    • DateTimeOriginal;
    • DateTimeDigitized;
    • DateTime;
  • retains every valid supported EXIF date found in a file;
  • uses the filesystem modification time when no supported EXIF date is available;
  • asks the user to select the authoritative date when a related group contains conflicting values;
  • copies files with unreadable, damaged, or invalid recognized-image metadata to unclassified for review;
  • copies files with a selected date to classified/YYYY-MM-DD;
  • compares existing output files byte-for-byte;
  • reuses an identical existing output or adds _1, _2, and later suffixes when a filename collision contains different data.

Original source files are not modified, moved, renamed, or deleted.

Output

The script creates the following directories inside the selected source directory:

<source>/
├── classified/
│   └── YYYY-MM-DD/
└── unclassified/

Each successfully classified file is copied into the folder matching its selected date. Files requiring manual review are copied into unclassified.

About

Python script created mainly for pictures that takes the files in a folder and classifies them in subfolders according to the EXIF date when the picture was taken. If there is no EXIF, it compares the file creation time and the modified time and if they match it uses that. If they don't match the user is prompt to choose which one

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages