It's enough to look in the /etc/emulationstaton/es_systems.cfg - that's where the folder/system mapping is kept.
Thank you. That was it. I forgot it :-D
Thank you guys. I'm not gonna make a scraper, just a gamelist editor, so I'm safe now on what to do ;-)
I use Renamer for Windows. It can clean up file names and delete those numbers you mentioned. Very nice program.
@jworkin after scraping your names will show up proper even if the filenames are a little less readable. You never want to change the filenames with mame as that is how they are identified by the scraper among other things.