Click here to Skip to main content
11,934,389 members (41,371 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


4 bookmarked

Tips to Recover Virus Affected Folder & Files from the Pen Drive

, 16 Apr 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Unable to view virus affected folder & files in pen drive[usb]


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.


Just in case you know the folder name:

  1. 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.
  2. Go to RUN,[Win key+r] and type "cmd"[type "color a" and press enter to make the screen a little attractive and readable].
  3. Go to your pen drive path, here p: is considered as pen drive path so type "p:" and enter.
  4. 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 ! ! ! ]
  5. 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].
  6. Now type "attrib -s -h -r foldername /s" and press enter
    Example: attrib -s -h -r photos /s
  7. 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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
India India
There are only 10 type of people in this programming world....
one who knows the binary and other who doesn't.

You may also be interested in...

Comments and Discussions

GeneralGreat Job Pin
walkerjohnnie29-Mar-15 22:27
professionalwalkerjohnnie29-Mar-15 22:27 
Questionstep 6 Pin
Asher Mills Ynwa16-Jul-14 11:26
memberAsher Mills Ynwa16-Jul-14 11:26 
AnswerRe: step 6 Pin
♥…ЯҠ…♥20-Jul-14 23:46
professional♥…ЯҠ…♥20-Jul-14 23:46 
QuestionNice article Pin
Rakshith Kumar21-Nov-13 22:57
memberRakshith Kumar21-Nov-13 22:57 
AnswerRe: Nice article Pin
♥…ЯҠ…♥21-Nov-13 23:21
member♥…ЯҠ…♥21-Nov-13 23:21 
GeneralMy vote of 4 Pin
Jayanta Chatterjee17-Apr-13 6:27
memberJayanta Chatterjee17-Apr-13 6:27 
GeneralRe: My vote of 4 Pin
rk_prabakar17-Apr-13 19:54
memberrk_prabakar17-Apr-13 19:54 
GeneralMy vote of 1 Pin
not_starman16-Apr-13 16:18
membernot_starman16-Apr-13 16:18 
GeneralRe: My vote of 1 Pin
rk_prabakar16-Apr-13 19:28
memberrk_prabakar16-Apr-13 19:28 
GeneralMy vote of 5 Pin
Pradeep SB1-Sep-12 18:45
memberPradeep SB1-Sep-12 18:45 
GeneralRe: My vote of 5 Pin
rk_prabakar2-Sep-12 21:30
memberrk_prabakar2-Sep-12 21:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151126.1 | Last Updated 16 Apr 2013
Article Copyright 2012 by ♥…ЯҠ…♥
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid