group-by-date

Shell command for grouping files by dates into folders

http://hub.darcs.net/thielema/group-by-date/

Version on this page:0.1.0.3
LTS Haskell 22.39:0.1.0.5@rev:1
Stackage Nightly 2024-10-31:0.1.0.5@rev:1
Latest on Hackage:0.1.0.5@rev:1

See all snapshots group-by-date appears in

BSD-3-Clause licensed and maintained by Henning Thielemann
This version can be pinned in stack with:group-by-date-0.1.0.3@sha256:82d71d3870734e37c6af1377317386777ffcfb44026f3877dba6b1b5f8e83c38,2379

Module documentation for 0.1.0.3

There are no documented modules for this package.

This program is intended for grouping photography images by date into a hierarchy of date related folders.

If you have a folder of photographies, say photos, you may run

group-by-date -r photos

The program will emit a Bash script like this one:

mkdir -p 2017/2017-06/2017-06-28 && mv photos/0001.jpeg 2017/2017-06/2017-06-28
mkdir -p 2017/2017-06/2017-06-28 && mv photos/0002.jpeg 2017/2017-06/2017-06-28
mkdir -p 2017/2017-06/2017-06-28 && mv photos/0003.jpeg 2017/2017-06/2017-06-28

You can inspect the script and if you like it, you can run it:

group-by-date -r photos | bash

If you want a different command, say copying with preservation of modification time, you can call

group-by-date --command='cp -p' -r photos

Alternatively, you can run the actions immediately, that is, without a Bash script:

group-by-date --mode=move -r photos
group-by-date --mode=copy -r photos

You can also change the target directory structure using the --format option. You can list all options and default values using --help.

Attention: Media for photographies is often formatted with FAT. This may yield trouble with respect to timezones.