NSF/NSFE Extraction Program Wanted

I have many .nsf files, which are essentially midi type files ripped from original rom cartridges of the original Nintendo. The files contain all of the music for each game. I have several hundred of these files, and I would like a utility that can take a folder containing all of these files, and then have an output directory where a folder will be made for each game, the individual songs will be extracted, and separate files will be created for each song/track within the folders.

The naming should be as follows.

Ex.

Mega Man 2 - (01)

So out of one file with many tracks, we will get individual files with just the one track.

Please have some knowledge of the format if possible.

Also, it should work on NSFE format files. These are very similar, but contain timing information for the songs and also song titles. Therefore, if a file is in this format, we should get something like this.

Mega Man 2 - 01 - (Title Theme)

Please see the file uploaded. Its work already done on this project in C/Java. You can continue using this and finish the program or start from scratch. It only works on 20-30% of the nsf files right now.