Helping people with computers... one answer at a time.
Flash drives are popular, convenient and extremely useful. But they can fail, and knowing that means you need to take preventative measures right away.
I have a flash disk which has been working well for quite some time. Just yesterday it refused to work. It was recognized by the computer but when I tried opening it I got the message that the disk needs formatting. I tried using it on another computer but the same message appeared. I also tried autoplay but nothing happened. When I opened the properties of the disk the file system was indicated as RAW. The data in it is very important and I need to recover it. Please advise.
I really have no answer for you. I honestly believe that your data is gone.
However, before you leave and potentially repeat the mistakes of the past, I'd encourage you to keep reading.
For anyone who uses a USB flash drive, there are two extremely important lessons to learn here.
One of which actually applies to everyone - flash drive user or not.
#1: Flash Drives Wear Out
Apparently, many people still don't realize this, but flash memory wears out the more you write to it.
How quickly it wears out will depend on the specific flash drive. Like anything, there is a wide range of quality in currently available flash memory-based drives. You can make a rough correlation with the cost of the device, but even that tends to change over time. Depending on usage and quality we could be talking as short as months or as long as several years. I've seen extreme cases of misuse lasting as little as as a few weeks, or on one case even a few hours (holding a Windows swap file).
The tip off for me is that you indicated that it's been working well "for quite some time". Depending on what you're doing with it (i.e. how much you write to it), the quality of the device and just how long "some time" is, I'm willing to bet that the device has reached the end of its useful life.
And as you've seen, when they fail they can fail catastrophically. Just one bad bit or sector in the wrong place can render the entire device unrecoverable to anything short of a complete reformat. Not only will a reformat lose all your data, but it may not work, and it appears that you already know that you're living on borrowed time - the device will fail again, and probably very soon.
#2: Never Keep Important Data in Only One Place
I want to emphasize that, because it applies to much more than just flash drives:
Never, ever, keep anything that's important in only one place; be it a flash drive, a hard drive or a web service.
As you can see if that "one place" goes away, so does your important data.
Critical data on a single flash drive? You're asking for trouble.
Family photos on a single hard disk? Plan on losing them all someday.
Your resume or thesis is kept only in a single online email account? It will disappear when you most need it. (And yes, this has happened.)
The obvious solution, of course, is to backup.
Naturally, a lot of people get intimidated by that, because backing up seems big and complicated and scary. It doesn't have to be, but even if it is: get over it or risk losing everything you've stored.
Backing up can be as simple as making a periodic copy of your data on another device. (Emphasis on the periodic, so that your backup stays up to date.) It can also be as simple as installing and using appropriate backup software.
In this case specifically having had a backup could have saved your data. As it is ... I believe you're out of luck.