How is best to achieve the following:
1000’s of photos in a ‘To Sort’ dir,
Photo’s from 10th May to 9th June 2007 move to Year 0Month 1
Photo’s from 10th June to 9th July 2007 move to Year 0Month 2
Photo’s from 10th July to 9th August 2007 move to Year 0Month 3
Photo’s from 10th August to 9th September 2007 move to Year 0Month 4
How would you tell the script the start date so it would know where to start calculating from?
Possibly have a start variable such as start=”10-05-2017″ then if the modified date is greater than 09-06-2017 move to Month 2 dir, but when you get to 200 sub directories would there be a quick way to get to work out what the next dir will be and create the structure.
So when it gets to lets say file with a modified date of 20th August 2021, it would check if folder ‘Year 14Month 168 – 14yr 0m’ exists and if it didn’t it would create it and then move the photo to that dir.
I’m thinking of doing this in either bash or powershell but have limited exposure to both.
thanks
I’ve seen lots of scripts that sort photos in YearMonths they were taken but my criteria of organising them is different to options out there I’ve seen.
le’ Chuc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.