Skip to main content

How to Unhide a Folder/Files Infected by Virus using Command Prompt

Keep reading

This case usually happens on our external USB drive and worst case if it happens on your computer or laptop drive. Virus will infects your system that causes your files to put on hidden mode without doing anything on those saved files. In that situation you will start wondering where are your files located or who deleted all those files you hardly worked on. 
Virus Hidden Folder

In the first look you cannot determine right away if your files are in hidden view unless you alter the folder view options of your computer.  Some actual scenario that tells if your USB or storage drive was infected by virus is that you can see autorun.inf (not at all times) or all you folders became executable files which is not the usual file type.

First thing to do is to scan the drive with the latest update patch on your Antivirus for that to be surely detected. Or you can also install malware removal tools to do the scanning as not all antivirus are capable of detecting new virus or malware.

After doing a scan on your Anti-virus, your virus infected folder or files are gone. The truth is all your infected files are still there they are just being hide by the virus after being infected.

Here's how to unhide your infected files and folders

1. Open Windows command prompt.
To open Command Prompt in Windows Xp: 

Click Start>Select Run>Type 'cmd' then hit Enter

To open Command Prompt in Windows 7: 

Just press Windows+R on your keyboard>Type 'cmd' then hit Enter

2. Then type your flash disk directory in windows command prompt, for example: E: then enter.
(Where E: is the drive letter of your Flash drive)

3. After that, type attrib -s -h /s /d then hit Enter.
4. Your done!

Or you can try this command when all your folders in your USB become shorcuts:

attrib -s -h -r /s /d f:\*.*

Where f: is your USB drive letter.

Note that before cleaning and removing the drive make sure that your PC also is virus free or the Antivirus definition is up to date. After cleaning your USB, you can also transfer all those recovered files to another storage then try reformatting the infected to make sure that it will function again as normal.


Unknown said…
Thanks so much. It worked for me.