Please stop creating 11,600+ blank folders in Images (and other) folders

Issue #6714 new
Beeman Dev created an issue

I am assuming coders thought if we just create all the subfolders we may ever need, we need never check if they exist. But this just creates a mess of empty folders as for Images we end up with 182 Platforms, each containing 45 subfolders, each of which contains multiple subfolders for countries. This gives 11,629 subfolders under Images of which only a fraction are used for a full LaunchBox rom set (created using dummy roms).

The problem being you then cannot see the woods for the trees, to easily see which media types you do have. I run a cmd to clear them all the time, maybe that could be run as part of the exit process.

for /f "delims=" %%a in ('dir /S/B/AD-S-L "C:\Emu\LaunchBox\Images" ^|sort /r') do rd "%%a" 2>nul

I understand checking for folders every time you copy a file in could be a slowdown, but then just put an exception handler around the copy and if it fails due to destination folder not existing then create folder and redo copy. So it will still only test/create once, as once created it will not except in this way.

Comments (4)

  1. RetroConnection

    I made this recommendation on the forums.
    Folders should only be created if they are populated. Otherwise, no empty folder should be created. Simple to think. Maybe it's simple to implement.

  2. Log in to comment