I recently freed myself from my MacOS system. On of the big concerns I had was preserving the fourteen years worth of family images I saved up in iPhoto.
I decided to export all 17000+ images, and put them into a folder tree organized by year, month, and day. The problem is that the files themselves contain no information about when the images were taken. The only property that identifies when the images were taken is the folder in which they sit.
Right now, my 'Pictures' folder tree looks like this:
2004/
2005/
2006/
2007/
2008/
2009/
2010/
2011/
2012/
01_January/
02_February/
03_March/
04_April/
05_May/
06_June/
18June, 2012/
File - 001.jpg
File - 002.jpg
File - 003.jpg
etc...
24June, 2012/
File - 001.jpg
File - 002.jpg
File - 003.jpg
etc...
07_July/
08_August/
09_September/
10_October/
11_November/
12_December/
2013/
2014/
2015/
2016/
2017/
2018/
Each year directory contains twelve month directories. Each month directory contains a day directory only if there are images for that day.
What I want to do is append all the image filenames so that they include elements from their superior directories:
Example:
./2012/06_June/18June, 2012/
File - 001.jpg -------> 2012-06-18_File - 001.jpg
File - 002.jpg -------> 2012-06-18_File - 002.jpg
File - 003.jpg -------> 2012-06-18_File - 003.jpg
etc...
Can someone help me find a way to do this? Python or Bash script, I'm okay learning how to do this in either. Thanks.