Mapillary_tools - managing all the extra files generated

I recently got an error while using the mapillary_tools because I was out of disk space. After cleaning up a bit, I soon had the same error again. The only reason I could come up with, was that the tiny files that the tool generates during the processing take up a lot of space. Turns out they do!

Before processing, 22.940 images were in 28 folders, total 53.2 gig
After processing, there were 550.000 files, 23.000 folders. And while the “real data size” was still about 50 gig, the “space on disk” use was 72.8 gig.

Now I’m not going to manually delete all those folders for my entire archive. After googling a bit, I found that it’s extremely easy to delete this stuff. On Windows, you open a command prompt, CD to the root folder with your uploaded images and type in:

FOR /d /r . %d IN (.mapillary) DO @IF EXIST "%d" rd /s /q "%d"

For a single upload batch, it takes a little while. For my entire archive it’s still running after several days, but it has already cleared 500 gig.

There’s other solutions of course. Accelerated Ideas has a little tool to delete several folders with the same name. And probably you can purge the whole thing with mapillary_tools itself, but I didn’t find it quickly - and that doesn’t help if you have a bunch of this already.