How to grab most recently modified file
<p>I have a folder with a bunch of files. Is there a way to select the file that is the most recently updated?</p>

<p>For example:</p>

<pre><code>FTP_FOLDER = os.path.join(os.getcwd(), 'ftp_folder')
xml_files = [file for file in glob.glob(os.path.join(FTP_FOLDER, '*.xml'))]
</code></pre>

<p>Now, how to get the most recent xml_file?</p>
