OIf they are on your external hard drive and you want them back on your local hard drive.
First check that the Copy files to iTunes medi folder is selected in Preferences, Advanced.
Alsoo under store turn off show ourchasaes in the cloud
Turn off itunes match
You now have an empty library
Then File > Add to library and choose the parent folder of music on your external hard drive click Open and itunes will copy all that music into the right folder on your machine. How long it takes depends on how much music you have.
When finished turn on itunes Match if you are using it