iSumsoft » Resources »computer » Recover Hidden Files in Virus-attacked USB Drive

Recover Hidden Files in Virus-attacked USB Drive

If virus attack you data in the USB during the data transfer and even make the files and folders invisiable, how to recover these lost data? In this tutorial you'll learn how to recover hidden files and folders on USB drive using command Prompt.

Part 1: Use Anti-virus Software Scan and Remove Virus

When USB drive was attacked by virus, your files is also attacked and even makes them hide and invisible. To recover these hidden files, the first thing you need do is scanning your USB drive and remove viruses.

Antivirus software installed in your computer can directly detect and remove virus in usb. After cleaning up, show hidden files and folders in usb drive.

But you may find it's hard to recover all your data, at this point you need unhide this hidden files and folders by using Command Prompt, you can refer to part 2.

Part 2: Unhide Hidden Files and Folders Using Command Prompt

Step 1: Connect your USB drive to PC, go to This PC, locate to Device and Drives. Click on USB drive, then click File to select Open Comand Window here option.


In Windows 7, go to Start > Computer, locate to Devices with Removable Storage, then press Shift key and right-click on USB drive icon, then click Open Command Window here.


Step 2: In Command Window, type attrib *. -r -h -s /s /d, and hit Enter.

Or copy and paste it , select Edit and Paste it, then hit Enter key to execute unhide command.


Tip :If this command is not recognized and prompting error as picture shows:


Solution: Copy and paste the following command, and then hit Enter key.

PATH=%SystemRoot%\system32;%SystemRoot%;-%SystemRoot%\System32\Wbem;C:\PROGRA~1\M-ICROS~2\Common\MSDev98\Bin;C:\PROGRA~1\M-ICROS~2\VC98\Bin;C:\PROGRA~1\MICROS~2\Co-mmon\Tools\WinNT;C:\PROGRA~1\MICROS~2\Co¬mmon\Tools;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin

Step 3: Then execute this command: attrib *. -r -h -s /s /d again.


It should be take effect. Then go to your drive, you'll see all hidden files and folders.

More Note about Command Code:

Attrib is a command in Microsoft Windows that allows the user to change various characteristics, or "attributes" of a file or directory.

*. indicates that command apply to all files and folders on the drive.

The symbols " –" are used to set and clear the attrib respectively.

r – Remove Read-Only flag.

h – Remove hidden file attributes.

s - Remove system file attribute.

s – Apply the above attribute modifications to all files in this folder and all subfolders.

d – Apply the above attribute modifications to the folders themselves too.

Sometimes people will hide a folder and then any files inside will not be visible. To execute this command will make all the folders and subfolders visible.