Introduction
I know that it's really annoying for people who have a pen drive infected with virus and are not able to view their files, even removed from the USB using advanced antivirus software.
Here I suggest a way to recover the virus affected files and folders(invisible) from the pen drive:
Consider [p:] drive letter is your pen drive.
Steps
Just in case you know the folder name:
- Just type the virus affected folder name in the address bar of your explorer.
Example: If your folder name is "photos", then just type "p:\photos" in the explorer address bar
Still can't find the files? Don't get frustrated.... follow. - Go to RUN,[Win key+r] and type "cmd"[type "color a" and press enter to make the screen a little attractive and readable].
- Go to your pen drive path, here p: is considered as pen drive path so type "p:" and enter.
- To view all files that you have in your pen drive, type "
dir /a
" and enter.
[Are you relaxed after seeing the invisible folders and files in your pen drive.... cheers ! ! ! ] - Now type "
attrib
" command and press enter.
[You can see that every file has the attrib as in the format of "A SHR foldername or filename]. - Now type "attrib -s -h -r foldername /s" and press enter
Example: attrib -s -h -r photos /s
- Now you can view the files under that folder.
[Finally got rid of the annoying virus.... it seems.]
Follow step 7 for all folders to recover the files and folders.