Popular recipes tagged "date" and "files" but not "babble" and "datetime"http://code.activestate.com/recipes/tags/-babble+date+files-datetime/2014-12-11T10:07:39-08:00ActiveState Code RecipesJPG files redater by EXIF data (Python)
2014-12-11T10:07:39-08:00Michal Niklashttp://code.activestate.com/recipes/users/186902/http://code.activestate.com/recipes/550811-jpg-files-redater-by-exif-data/
<p style="color: grey">
Python
recipe 550811
by <a href="/recipes/users/186902/">Michal Niklas</a>
(<a href="/recipes/tags/date/">date</a>, <a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/jpeg/">jpeg</a>, <a href="/recipes/tags/jpg/">jpg</a>, <a href="/recipes/tags/pil/">pil</a>).
Revision 6.
</p>
<p>Iterates through a directory, reading the EXIF data from each jpg/jpeg file.
Parses the date/time from EXIF data and:</p>
<ol>
<li>if it differs from file modification date/time then changes file date/time</li>
<li>moves file to <code>YYYY/YYYY_MM_DD</code> directory</li>
</ol>