Rename directory based on date of file in directory

view full story

http://unix.stackexchange.com – I am looking for a smart way to bulk rename directories in my photo library based on the date the pictures were taken. My specific use case: Export the image library from iPhoto or Aperture on OS X to a more permanent and OS-independent file and folder structure. The input list of directories would look like this: 1.2.2012 input_directory_name The renamed output should look like this: 2012-02-01 - 2012-02-22 2012-03-14 - 2012-03-14 input_directory_name The dates should be picked either from the creation dates of the pictures in the directory (oldest / newest date) or alternatively from (HowTos)