Found this through Google and I've got a solution, as I also have all my music sorted in folders. What you need is mp3tag, and then you need to do this;
- Select 'action' at the top.
- Make a new action.
- Set the values;
Action type: Guess values
Source format: %_folderpath%
Guessing pattern: %dummy%\%dummy%\%albumartist%\%dummy%
Now the 'albumartist' tag is all set according to whatever the folder name is from 2 levels in. My music is all in F:\Music, so one level down is where all the artist folders are.
Once the group is done, just load your whole music folder, select action at the top again and click on the group you've just made. It'll take a while depending on how big it is. Once done, don't forget to click the blue save icon on the top left to make the changes permanent.