*Now you will get a command prompt. In that the default path is may c drive. Change it with your pendrive letter. Assume your pendrive letter is K. Then type K:and hit enter. The path will be changed to C to K.
*Then paste this code in attrib -h -s -r /s /d k:*.* command prompt. (Change the letter K according to your USB drive letter).
*Wait sometime for the process to finish.
*After that re-plug your USB pendrive. Now you can able to see your files. Also it will get back your hidden files.