If you do not have a Time Machine backup to restore from: (if you do you can restore from the backup and your done!)
If you have the folders they generally go to you users file along a path like this...
Macintosh HD (or whatever you named the drive) : Users : your user account : Music : iTunes Media : Music :....
However if they are thousands of "loose" files you can open iTunes, Open the "Music" folder on your desktop, select all the files then drop them onto the iTunes app window and they will re-import to that path (or what you specified in your iTunes preferences) - The metadata in the files should organize however they were set up to organize in the iTunes preferences (artists/album/song)
Some things to consider as you go:
1) Do a backup first, put the 8000+ songs on another drive or do a time machine backup if you have not done so already
2) Verify the files are in the new folder
3) Verify the size of the two folders are approximately the same file size and contain the same amount of file (the folder count will be different)
4) Depending on the speed of your Mac CPU and available RAM this operation could take a few minutes or a well over an hour.
5) Once the copy is verified you can remove the one on your desktop if you wish.