View all essays

Koken export original images

Koken organizes photos in Albums (and Sets), The original uploaded photos are stored in an obscure folder structure like:


Every uploaded photo has two unique subfolders in the koken storage. Impossible to see what goes where from Finder or FileExplorer. The PHP script below reads the Koken database and copies the original files to a new location with a separate folder for each album.

It runs on MacOS and should run on Linux with minor adjustments (macos command cp -n is unsupported on other unix systems). Windows users must edit the mkdir and cp parts.

A set of folders and files in the structure of Koken is needed for offline viewing on digital image frames and photoviewers on tablets, smartphones, TV's etc. etc. In my case Plex. Or just as a backup.

Since Koken is end of life you really need this to export the images and import the recovered images in your new CMS (Piwigo or X3 from if you want my 2 cents)

Download php:

The rar file has two files: koken-export.php and koken-export-testprint.php

Start with koken-export-testprint.php, modify the code to connect to your database. It should print a list of album names from your Koken install. If that works try koken-export.php

  • Koken database repair

    Albums disappearing, albums don't sort properly, albums jumping from one Set to another: Your koken database is confused. Easy to fix if you have a MySQL editor like phpMyAdmin or Navicat. Open the table koken_albums and sort the table on the following…

    Control Max2Play with Logitech Smart Control

    Max2Play (www. max2play. com) on Raspberry Pi 3 is a great alternative for Logitech Squeezeboxes. I needed a Jivelite setup for my HD screen to control my Logitech Touch as a couch potato without using binoculars. I had set my mind on controlling…