Anytime you have a severe data loss, try to follow these steps:
WRITE PROTECT your drive, if possible. Since you've got a flash drive, this might be easy to throw a switch, if provided. Any attempted recovery, or even allowing Windows to mount the drive will do some writing to the drive, which can cause more losses. FAT32 has ONE file allocation table, (which has the only pointers the which sectors represent which files and folders), so when that gets corrupted, "fixing it" can make matters worse.
Do a complete TRUE IMAGE Backup of your drive's PARTITION to another medium. Do NOT use ANY program that does not offer a complete sector-by-sector copy of that partition. (Suggestions welcome for a free version of reliable backup. Ghost in the DOS days worked pretty well, using it's options). Now, set your corrupted flash drive on the shelf and don't touch it, since it is possible you might need it again, and might want to still use it later to either restore this data, or start fresh.
Make double the amount of room available on a drive you will be able to safely restore to. The perfect candidate might be an unused internal drive, or an external rotating drive. If already formatted, you'll have to reduce the size of one of the partitions, preferably the last one, if there are more than one. I would strongly recommend you don't use any system drive, and you had better know what you are doing when you restore that partition, since it is easy to make a mistake or not understand the backup software, and you inadvertently overwrite whatever was on that drive. Recent versions of Windows can safely reduce the partition size to make room, as well as a number of other free third party tools.
Restore your partition to that (conventional) hard drive, understanding that if you mess up, or the software you are using does, you can destroy whatever was on the drive.
NOW you can use whatever recovery tools you'd like, without fear you'll mess it up, since you can always re-restore that partition and try again. This is very close to what any forensics investigator would do. (Except they would copy from the first sector to the last, and not just the partition. My company made a forensics tool used for this purpose in some notable criminal cases.) If Windows can't recover, then try SpinRite by Steve Gibson. It isn't cheap, but it will recover most anything that is recoverable. (It can also scan and fix many hardware problems on your flash drive, or most any hard drive.)
PREVENT most problems from happening again by:
1. NEVER unplugging ANY USB drive, until and unless Windows has unmounted the drive and said it is safe. There should be an icon, bottom right where you can right click to do this. Or there are a number of other ways to ensure that the drive is not being used.
2. Changing the partition type from FAT32 to NTFS. This NTFS file system is designed to recover from most file system problems. For instance, NTFS keeps three file allocation tables. So if you pull the drive out while writing to one of these tables, (one of the main causes of corruption), the other two will be used instead. NTFS is an amazing file system. However, Apple Macs can have problems when sharing a USB drive with a Windows PC, depending on which versions of both OS's, regardless of using FAT32 or NTFS partitions. (I recommend using a network/internet file sync product, instead.)
The size on disk value is at best only an approximation, this being particularly true when dealing with a complex file system like NTFS. There are many factors that make this far more complicated than would at first appear. Just a few of these factors:
- Reparse points
- Compressed files
- Hard links
- Sparse files
- Alternate data streams
- File and folder Overhead
Small files may fit entirely in the MFT and will not have any data clusters allocated at all. Exactly what size depends on how much space is available in the files MFT entry. That depends on the length of the file name, the space needed for security information, and much more.
The best way to deal with these factors depends on how you want to use the information. There are no clear cut answers as to which way is best so numerous arbitrary decisions had to be made.
Regard the on disk value as only a guide. In some cases, such as with large numbers of very small files, it isn't even close. Real accuracy would only be possible if you could specify all the parameters and even experts would find that hopelessly confusing.
See this article for more information:
https://blogs.msdn.microsoft.com/oldnewthing/20041228-00/?p=36863/
Best Answer
chkdisk sometimes converts your folder to file type during the scan. To recover your data, follow the below steps.