Extract music from usb with correct folders?

Is it possible to extract my music from my usb to my desktop with the music in the correct folders?

know on my usb I have database and music folders with my files inside but they are all mixed together.

If the definition of “correct folders” means “whatever folders they were in from the source storage media”, no.

I’m guessing you lost your source material?

I assume the USB was created via Engine DJ sync from the desktop computer and you lost the files on the desktop. As you must have discovered, sync completely rearranges your music files into folders by artist and album. Therefore, it would depend on how you originally had your music organized or how you would like it organized. Select music tagging programs (Mp3Tag, MusicBrainz Picard, I believe) offer the feature to arrange your music based on the tags.

If you have programming skills you could extract the original file location from the Engine DJ SQLite database and write a script to copy or move them back to the original location. The “path” column in the track table of the …/Engine Library/Database2/m.db database stores the relative location (including filename!) for those files. E.g., …/iTunes/iTunes Media/Music/$DJRemixServices/DT/DiscoTech 45/Batida_de_Coco_#E-O-Tchan(Alexis_Santis_Mix)(DT)_126bpm.aiff

Oh, but if you lost the complete desktop version with no backup, you’re out of luck on that.

Correct, the folders they were in enginedj and yes, my backup hdd died.