You can try these:
Updated: Create-reapeaks-in-folder.zip
Updated with reaper.PCM_Source_Destroy(src) so RAM don't build up.
Also: Create-reapeaks-in-subdirectories-for-media-type-(Win).zip this will do all sub directories in a single folder.