You are on page 1of 4

Using Command line: To solve/fix the folder's hidden or system file, the easiest

way is to run a command line. You can apply this command to USB and local drive
as well, need to change the drive_letter. Go to Run, type cmd and hit enter. In
command prompt just type: attrib -h -s -r -a /s /d drive_letter:\*.* And hit enter. Be
sure you've typed the drive letter (e.g. j:,h: or D:) instead of "drive_letter" in the
command line. My USB drive letter is J: and my command should looks like:
Command for unhide system-hidden files on a drive All files and folders will be
normal and you should be able to delete the shortcuts, created by the
virus.Command line details: Here atrib=attribute, "-"=remove attribute/permits,
h=hidden s=system, r=read-only, a=archive, /s=sub directory, /d=directory,
drive_letter=the letter of the drive shown in windows explorer (e.g. j:,h: or D:) and
*.* is called the wild card for all files.If you don't like to be a "command Ninja" then
see below. USB, MicroSD, MiniSD or other Mmory Cards issue:
1. Connect
your USB or memory card to the PC or laptop.
2. Copy these lines and paste it
into a "new text file" @echo offattrib -h -s -r -a /s /d drive_letter:\*.* 3. In the 3rd
line give the drive letter name (Example: J or K or L etc.) instead of "drive_name" 4.
Save the text file as any_name.bat 5. Double click on the any_name.bat file and it
will run in the command prompt and see the hidden files/folders come back. 6.
Delete the shortcuts and unnecessary files and folders from USB drive. Local drive
issue: 1. Copy these lines and paste it into a "new text file" @echo off attrib -h -s -r
-a /s /d D:\*.*attrib -h -s -r -a /s /d E:\*.*attrib -h -s -r -a /s /d F:\*.*attrib -h -s -r -a /s /d
G:\*.*attrib -h -s -r -a /s /d H:\*.*attrib -h -s -r -a /s /d I:\*.*attrib -h -s -r -a /s /d
J:\*.*@echo complete. 2. Save the text file as a bat file (example: any_name.bat) 3.
Run this bat file by double-clicking on it. Thus you can solve this kind of problems
with a *.bat file. You can save the *.bat file for solving this hidden
problem. Important: These tutorials are applied for Windows 7/Vista/xp. You must
have the administrative privilege to run the command or execute the .bat file. Put
the " : " after the j, k, or D (drive letters). These commands are not case sensitive.

Recover Hidden Files From Flash Drives or


External Hard Disks Due to Virus Infection
If the files and folders in your external hard disk or flash drive have turned into shortcuts or are
hidden, here is one solution to recover your data. Operating system used Windows 7.
1. Install good antivirus and scan entire computer including the flash drive/external hard
disk.
2. Go to Control Panel, Folder Options, select VIEW tab, select Show hidden files, folders
and drives and uncheck Hide protected operating system files (recommended) now
click APPLY

Folder Options
3. Open command prompt (press Win+R, type cmd, press enter), assuming G: as the letter
of affected drive, enter this commandattrib -h -r -s /s /d g:\*.*

replace g: with other drive letter if needed.


You can check your flash drive/external hard disk, the data should be visible. You can restore the
original folder options.

How to Unhide All Hidden Files in the Flash Drive Memory With ATTRIB

If your computer has been infected with certain malware, files on your flash drive may be
marked as hidden. You can change the Hidden attribute for the files on the USB drive by
running the ATTRIB DOS command to change the Hidden and other attributes of the files on the
drive. With the ATTRIB command, you can modify all files on the drive at once. Note that
viruses that apply the Hidden attribute to files on your flash drive may also enable the Read-Only
attribute for the files. You can also disable this attribute when you unhide the files.
Step 1
Plug the flash drive into a free USB port on your computer. Once the device is registered to
Windows as a removable drive, open Windows File Explorer and note the drive letter for the
USB drive.
Step 2
Open a command prompt window by typing cmd in the Charms bar's Search field. Click the
Command Prompt link when displayed on the screen.
Step 3
Type cd\ and press Enter to change directories to the root folder.
Step 4
Type the drive letter for the USB drive, then press Enter. The current directory changes to the
root of the flash drive. Note that you can view all hidden files on the drive by executing the
dir/ah command from the prompt. A list of the hidden files is displayed on the screen.
Step 5
Type the following command at the prompt, then press Enter. attrib *. -h -s /s /d The asterisk
(*") after the ATTRIB command indicates that the command should apply to all files and
folders on the drive. The -s switch clears the System File attribute for all files. The /s
parameter indicates that the command should apply to all files inside subdirectories. The /d
parameter indicates that the command should apply to the directory containers, as well.
Step 6
Type dir at the prompt, then press Enter to view the files after the Hidden attribute has been
removed.
Step 7

Type exit, then press "Enter" to close the command prompt window. Remove the USB drive
from the port on your computer.

If the files on the USB drive have been changed to Read-Only by the malware, add the r switch to the ATTRIB command to make the files writable again:

attrib *. -r -h -s /s /d