Copy by attribute


Here is a perl script I scratched together yesterday to help me file digital camera images faster (I keep them organized by date on our file server, but can never be bothered to run any of those feature-laden camera programs — I like having the camera, or its memory cards, just show to up as a file system I can yoink things out of).

I’ve written it in such a way that various other attributes of the files can be used as the basis for grouping them. It also supports only creating symlinks to files, rather than real copies, and doing that over multiple attributes per file (size, age, owner, etc.), so it could also be used to create sort-of attribute-based indexes of file systems, perhaps.

Or something.

Anyway, improvements and suggestions welcome.


  1. Looks like http://www.gnu.org/software/songanizer/ for images :)

  2. Or you could provide it as a filesystem using FUSE. And I see that there’s even a Fuse module on cpan.

    Unless, of course, this would turn it into some dynamically-generated, database-backed file system layer that wins smart-arsery awards while solving no existing problems any better than this script does.

  3. Clearly, ‘songanizer’ is a groaningly bad name, which makes it really good in branding terms.

    I guess I need something punchier than ‘copy-by-attr’, before I enter the 2008 contest for Smartiest Arse.

    I did fleetingly think “how quickly could I knob up an interface to external programs?” to allow arbitrary attributes to be divined; not just MP3 tags, but also attributes such as ‘e-mail recipient’ or ‘already compressed’ or ‘not in portage’.

    And then I noticed the pinging of my Pointless-Timesink-O-Meter, and decided to have a beer and do something more useful instead.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: