title: How to get the latest file in a folder?
body: <p>I need to get the latest file of a folder using python. While using the code:</p>
  
  <pre><code>max(files, key = os.path.getctime)
  </code></pre>
  
  <p>I am getting the below error:  </p>
  
  <p><code>FileNotFoundError: [WinError 2] The system cannot find the file specified: 'a'</code></p>