Split data and keep files from the same subfolder together

Uhm… Looking around I found this post which presents a package that split files using the structure above but this do not allows to keep all the files from the same subfolders.
Pinging the author, @fitler. There is any way to implement this on split_folders?