I was shocked to see most of contents in a flash drive were missing which I had accessed a day before. Many experts suggested that virus scan might have cleared it. But I was not convinced. When drive is accessed using command prompt too no different, but I got a clue – it was showing used space of drive properly. From command prompt I was could open a MS-Word doc not shown.
After a long time I could recall use of dos command and fixed a single file successfully.
Here is the way:
Reason: Missing contents were not physically deleted, but got changed as Hidden.
Some articles suggest that this can be a result of virus known as console.exe specially on Vista OS
Step to fix:
Click start>run>type in "cmd"
Type the location of your flash drive. For example "f:", "g:", etc. or any valid drive
Type "dir /ah" (this shows hidden files)
Fix single folder/file
Type "attrib [name of file/folder] -r -a -s -h"
To unhide a file, shall type file name completely with the extension for example “attrib mycat.jpg -r -a -s -h”
If file name is longer than 6 characters, shall type first 6 characters of file name followed by “~1”. For example customers.sql shall type “attrib custom~1.sql -r -a -s -h”
Repeat step 4 as necessary
5. Fix more sub-folders and files can use following
type "attrib *.* -r -a -s -h /s /d"
Note this can fix files with labels including space in between too
You can learn more about attrib command, type help attrib at command prompt