If you don’t know, all windows files and folders has their own special attributes. Can be a single attribute or multiple attribute for single file and folder. These attributes are used to protect and classify files. For example if a file has a hidden attribute, that’s mean in normal state this file will be hidden from windows explorer. If a file has a read only attribute, this mean the file can not be changed or updated (read more about DOS and Windows file Attribute on wikipedia).
These feature sometime exploited by viruses or malware in order to fulfill their purpose. Many peoples reporting missing files and folders after cleaning their USB flash drive from viruses which is actually hidden by virus. Antivirus can only repair/remove infected files and folders. It doesn’t repair repair hidden documents since those documents was not infected by viruses. But then they finally retrieved their missing documents with attrib MS-DOS command to unhide hidden files and folders.
If you don’t like to type a things on a plain MS-DOS console, you can also change attribute directly from Windows Explorer. Please note that Windows Explorer require you to enable show hidden files and system files attribute on Folder Options which will unhide all hidden files and folder. This way you can then set new attributes to all affected files and folders. As an additional you might also want to try the following 2 graphical tools.
AttributeMagic is a free portable application, which an only change attribute of a single file or folder path. The main function of this utility is to modify file and folder date-time stamps, change file/folder name, change extension and also change attribute.
BulkFileChanger is another free portable utility which can do bulk files attribute changer. Just like the previous too, this tool doing exactly the same but for multiple files and folder.
As a prevention for viruses infection you should install anti virus on your system, scan regularly, and scan any incoming plug and play media before directly accessing the drive. Watch also for incoming email from unknown user especially email that come with an attachment. Make sure it doesn’t contain virus or any malicious ware or files.