# Sort JPG from VIRB by EXIF to directories according OSM tiles

**URL:** <https://forum.mapillary.com/t/sort-jpg-from-virb-by-exif-to-directories-according-osm-tiles/2675>\
**Category:** Command line tools\
**Created:** [March 11, 2019, 8:17pm UTC](https://forum.mapillary.com/t/sort-jpg-from-virb-by-exif-to-directories-according-osm-tiles/2675 "2019-03-11T20:17:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moenk](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/moenk/32/68240_2.png) [@moenk](https://forum.mapillary.com/u/moenk)\
**Post date:** [March 11, 2019, 8:17pm UTC](https://forum.mapillary.com/t/sort-jpg-from-virb-by-exif-to-directories-according-osm-tiles/2675/1 "2019-03-11T20:17:05Z")

</div>

I was in need of a tool that chunks my big load of JPG files from my Garmin VIRB to sequences of a reasonable size (not just 1000 pictures each sequence). So i coded this Python3 script to sort pictures to new directories according to the OSM map tiles of zoom level 12 (ca. 5 km border length, can be changed).  
[https://github.com/moenk/mapillary-tools/blob/master/python3/exifsort3.py](https://github.com/moenk/mapillary-tools/blob/master/python3/exifsort3.py)  
Now it is easy for me to find pictures of a given area after a long trip. Also as this results in sequences of 200 to 300 pictures they can easily uploaded as a sequence with the Mapillary command line tools afterwards.
