Tuesday, December 27, 2011

Unhide Files in Virus Infected Pendrive Using Command Prompt


One sure way to retrieve your file or folder attributes back to unhidden is to use command prompt in windows. All you have to do is described below in steps.

STEP 1:
Plug your pendrive to USB port of your computer. Make sure it is detected.

STEP 2:

Start command prompt by Click Start>>Run and type cmd then hit enter.

STEP3
Find the drive letter for the conected USB drive. For example, G:
In command prompt, type G:
Then type
attrib -s -h /s /d *.*

Make sure that you put space between each elements in the code.
hit enter, wait a moment and this should unhide all your files on your pendrive. Checkout the screenshot for more to clarify.

How to view hidden folders:

  • Click on Start –> Control Panel –> Folder Options.
  • Click on the View Tab and check the radio button “show hidden files and folders” and press OK.
  • This will enable you to see the hidden file.

By using DOS Command – attrib:You can do the same with DOS command also at Command Prompt. Here, We will use the DOS Command “attrib” to accomplish the same task.

  • Click on Start –> Run –> cmd
  • For example, I have a directory called “Perl” in root directory and I want to hide that directory with the help of attribute command.
  • Change the directory one level back to the directory you want to hide.
  • Type attrib +h Perl and hit Enter. That’s all, Perl folder is hidden now. You can type dir on the command prompt and you will not see Perl there in root directory.
  • Type attrib –h Perl to unhide the folder.


Little more about attrib: attrib is a DOS command to change the attribute of folder and files at command prompt. + and – are used to set and clear the attrib respectively.
Avaialable attributes are:

  • R – Set the file Read-Only
  • A – Set Archive attribute to files.
  • S – System file attributes
  • H – Hidden file attributes.

 

9 comments: