John Mann's Weblog (on sng)
 

String around my finger
A 'blog to remember things I found.
Tie a string around your finger
My Home Page
I work for NIS ITS Monash University Australia.

Index

Flavours

  • index
  • circa 1993
  • RSS
  • Links
    These are a few of my favourite links.

  • Home Page
  • Live weblog
  • Static weblog
  • raelity bytes ;-)
  • Slashdot
  • Subscribe
    Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.


    blosxom

    GeoURL

    IP Geotargeting
    Visit eBay

    Click to call me FWD# 61159

       
    Tue, 22 Nov 2005

    Rename photo files

    I needed to re-arrange my collection of photo files. To standardise the file naming, I used the Linux rename utility, part of util-linux.

    find | grep AUT | xargs rename AUT aut
    find | grep DSC | xargs rename DSC dsc 
    find | grep IMG | xargs rename IMG img
    find | grep JPG | xargs rename JPG jpg
    find | grep Mov | xargs rename Mov mov
    find | grep MOV | xargs rename MOV mov
    find | grep THM | xargs rename THM thm
    find | grep TIM | xargs rename TIM tim

    To split files up by date, I hacked up some Perl, pushdir.pl that looked at the EXIF data (if any) for the creation time or used the mtime of the file, and moved the file to a directory yyyy-mm-dd, creating it if nexessary.

    Rotating the image in a file changes the mtime of a file, but not its EXIF timestamp. Copying a file from a camera or memory card may or may not preserve the file creation time, or create funny capitalisation.

    [ /media | # ]