I plugged it in to my pc to transfer some video files, when I inserted the player the hard drive was named something in gibberish with spaces and !"£$%^& type lettering. Also, the music folder was empty and there were 2 new folders also with gibberish titles, that I could not open.

I scanned for errors in windows properties, which fixed the hard drive naming error and removed the gibberish folders, however the music folder is still empty, and the properties of the HDD still says 17 out of 130 or so GB free, which is how it was before this issue, so I assume the music is still on there, just not in the music folder. Searching the HDD with windows for any .mp3 files yealds no results.

I don't have the X7 so all I can say is what I know about recovering files from HDDs in players in general. What I know won't always hold up, but it applies in most cases.

Whether or not any files can be salvaged will depend on how the music was transferred. If is transferred while a player is in MSC mode, as in to a drive letter, there's a chance the the files can be recovered. Software like Recuva and PhotoRec can scan the file system and recover what hasn't been overwritten or isn't too badly corrupted. The chances of recovering a high percentage of the files that way is pretty good depending on what caused the drive to fail.

If the files were transferred in MTP mode the chances of geting anything back off it are pretty much nil. Files loaded in MTP aren't actually files per se. They're a series of links that can only be read by the system that created them. That system is the player itself and if it's lost it's ability to read the files there's no known way to recover them. I'm hoping you loaded in MSC.

If you did load in MSC I'd start by trying PhotoRec. It's recovery methods have worked for me somewhat better than Recuva. Neither works very well if the file system is badly corrupted. They're both free and have very good directions on how to recover what's found and not cause further damage.