Documentation
Everything you need to go from a folder of IMG_4471.HEIC files to a library you can actually find things in.
tsoqna (say it however you like; most people say sock-na) is a command-line tool that reads the capture date stored inside your photo and video files and uses it to rename them, file them into folders, or both. It never edits the files themselves — only their names and locations — and it can always show you a plan before it does anything.
Five ideas to know#
| Term | Meaning |
|---|---|
source | The folder (or files) you point tsoqna at. Subfolders are included unless you pass --no-recurse. |
destination | Where files end up. For rename it is the same folder; for sort it is whatever you pass to --into. |
pattern | A template like {date}_{time}{ext} that turns metadata into a file name. See Patterns. |
plan | The list of moves tsoqna intends to make. Printed by --dry-run, saved with --plan. See Dry runs & plans. |
journal | A small log written during every real run, which tsoqna undo uses to put things back. |
The commands#
tsoqna rename PATH... rename files where they are
tsoqna sort PATH... --into DIR move (or copy) files into a dated folder tree
tsoqna inspect FILE... show the dates tsoqna can find in a file
tsoqna apply PLAN.json carry out a saved plan
tsoqna undo [--list] reverse the most recent run
tsoqna config show [--origin] print the effective configuration
Run tsoqna help <command> for every flag. The pages in this section explain the ones that matter.
Where to start#
- New here? Install it, then try the quick example on the front page.
- Tired of typing the same flags? Put them in a config file.
- Looking for a ready-made setup? The recipes cover the common ones.
- Something looks wrong? Troubleshooting first, then the FAQ.
These docs describe tsoqna 1.4.2. Behaviour that changed in a recent release is marked with the version it arrived in, e.g. (since 1.3).