tsoqnav1.4.2

Sort a decade of photos by the day they were taken.

tsoqna is a small command-line tool that reads the capture date inside your photo and video files, then renames them or files them into tidy dated folders.

It shows you exactly what it will do before it touches anything, it never overwrites, and it can put everything back afterwards.

$ tsoqna sort ~/Downloads/phone-dump --into ~/Photos -n
  plan  IMG_4471.HEIC  -> 2026/2026-08/2026-08-14_093112.heic
  plan  IMG_4471.MOV   -> 2026/2026-08/2026-08-14_093112.mov
  plan  DSC00218.ARW   -> 2026/2026-08/2026-08-15_181502.arw
  plan  DSC00218.xmp   -> 2026/2026-08/2026-08-15_181502.xmp (sidecar)
  skip  receipt.png    no capture date
1,284 files · 1,283 planned · 1 skipped · nothing written (dry run)

What it does

One job, done carefully.

Reads real capture dates
EXIF, XMP and QuickTime metadata from JPEG, HEIC, PNG, most camera RAW formats, MP4 and MOV. Not the file’s modified time, unless you ask.
Readable patterns
{date}_{time}{ext}, {Y}/{Y}-{m}, {model|slug}. Strftime-style formats when you need them.
Dry runs and plan files
See every move before it happens. Save the plan as JSON, edit it, apply it later.
Undo
Every real run keeps a small journal. tsoqna undo puts things back.
Sidecars come along
.xmp, .aae and .thm files follow their photo. Live-photo pairs stay paired.
Never overwrites
Name clashes get a suffix, get skipped, or stop the run — your choice. Overwriting is not on the list.

Install

A single binary, no runtime to set up. More options in the installation guide.

Homebrew

brew tap tsoqna/tools
brew install tsoqna

pipx

pipx install tsoqna

Cargo

cargo install tsoqna --locked

Quick example

Four commands, from a messy folder to a sorted one.

  1. Check what tsoqna sees

    $ tsoqna inspect ~/Downloads/phone-dump/IMG_4471.HEIC
    IMG_4471.HEIC
      exif:DateTimeOriginal   2026-08-14 09:31:12   (used)
      exif:OffsetTimeOriginal +01:00
      file:mtime              2026-08-20 22:10:05
  2. Dry run

    tsoqna sort ~/Downloads/phone-dump --into ~/Photos --folders "{Y}/{Y}-{m}" -n

    Read the plan. Nothing has been moved yet.

  3. Do it

    tsoqna sort ~/Downloads/phone-dump --into ~/Photos --folders "{Y}/{Y}-{m}"
  4. Changed your mind?

    tsoqna undo

    Everything goes back where it came from. See undo for the details.