title: Get the date a file was created, create a folder with that date and move the files
body: <p>I'm trying to automate organizing my photography folder of over 3000 photos. </p>
  
  <p>I'd like to get the date the file was created, create a new folder of that date formatted as <code>DD-MM-YYYY</code> and move the file from its current folder into the new folder.</p>
  
  <p>I was able to retrieve the created date of one of the files using the below code</p>
  
  <pre><code>print("created: %s" % time.ctime(os.path.getctime(file)))
  </code></pre>
  
  <p>Which returns <code>created: Fri Mar 22 17:49:36 2019</code>.</p>
  
  <p>Below is a sample of the folder. In this case, the created date is the same as the modified date but this is not always the case!</p>
  
  <p><a href="https://i.stack.imgur.com/Wgu1d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wgu1d.png" alt="Files in folder"></a></p>
  
  <p>How can I achieve this?</p>