title: Setting file created date based on date contained in filename using Applescript
body: <p>I hope some clever guy/girl can help me out. I've got 1000s of photos in several folders that have the wrong created date (my HDD failed and when I recovered them they all had the recovery date set as created date). Most of the files have the date they were taken in the filename in the format '(YYYY-MM-DD HH-MM-SS)....' with some other text where the ... is and the filename has the ()</p>
  
  <p>I am trying to write an Applescript to change the created date based on the filename. This would then allow the photos to be properly organised in Apple Photos. I haven't programmed for years (I was bad back in the day) and was struggling but needed to write something to say:</p>
  
  <p>if filename contains (YYYY-MM-DD HH-MM-SS)
  set file date created to (YYYY-MM-DD HH-MM-SS)</p>
  
  <p>and to do this for an entire folder of photos.</p>
  
  <p>Thanks so much for any help. It is my wife's life's photos and you could really help my marriage :)</p>