Page 1 of 1

Reorganize Photos into yyyy-mm folders

Posted: 09 May 2026 20:52
by dtmoc
Hi All!

I'm pretty new with XYPlorer but did try to look around for a easy solution for this.
Saw varying options but none worked in v28.30.0600.

Kinda expected XYPlorer could do it since it does so much!

How can I the app so that reorganizes picture files, for instance, in folders named as YYYY-MM?
Ideally this would be by EXIF date - but a fallback (or alternative) to do by date created would be good.

Simplified example
photos\pic1
photos\pic2
photos\pic3 830
photos\pic4
etc

photos\2026-01\pic1
photos\2026-01\pic2
photos\2026-02\pic3
photos\2026-02\pic4
etc

What am I missing?
I tried some options in move but could not get separate folders.
Saw some script options but they did not work and I am not familiar enough to troubleshoot yet.

Re: Reorganize Photos into yyyy-mm folders

Posted: 09 May 2026 22:19
by highend
Select the files, execute the script...

Code: Select all

    end (get("countselected") == 0), "No file(s) selected, aborted!";

    setting "BackgroundFileOps", 0;
    $items = <get SelectedItemsPathNames>;
    foreach($item, $items, <crlf>, "e") {
        if (exists($item) != 1) { continue; } // Skip folders
        $path = gpc($item, "path");
        $date = property("#image.datetaken", $item);
        if (!$date) { $date = property("#date.c", $item); }
        $date = formatdate($date, "yyyy-mm");
        moveto "$path\$date", $item, , 2, 2, 4, 1, 0, 0, 1, 0, 0;
    }
    echo "Done...";
And no clue why "photos\pic3 830" should turn into "photos\2026-02\pic3"...