WD Hard Drive- files are gone but folders are still there

Use Disk Warrior or other data recovery software

partition is corrupted which is a really common problem with external drives

can happen if the drive gets disconnected without ejecting but that’s not the only reason