News Ticker


[Solved] HOW TO: Restore Hidden Folder / Files Using CMD?

To show and restore your hidden files or folders in your USB Drive/PenDrive, you need to use an easy way - by using the only built-in tool - CMD or command prompt.

Today, there are lots of viruses and worms that affect many computers globally.Mostly virus and worm are annoying especially when the worm/virus hides folders, and sometimes it creates a copy an executable file with the same folder name which tends to click it without knowing it is already a virus. Phew!

Restore Hidden Folders and Files Using CMD
Plugging to Another PC Does not Guarantee Protection

Average users sometimes did not notice that they have been infected primarily on their flash disks. Well, the flash drive is a common way to save, transfer and backup important files like documents, photos, and installers.

Just plugging your USB flash drive to another PC does not guarantee your security and not even protect your disk to a particular virus and worms unless the owner of that system that you inserted your disks were highly techie-geeky ones or if, not they have installed better Anti-Virus.

So be careful. Thus,
  • Your PC does not 100% secured and protected against viruses, malware, and worms.
  • Your Friend's PC does not guarantee safe too.
You might love to read these posts:

TIP: Click on the image screenshots to view larger

Virus Hide Folders( sometimes creates shortcut and executable file )

The most common virus experienced by the user is the virus that hides your folders and then makes copies that have similar folder icon and folder name but only differs on file type because it is created an executable one. (.exe) And sometimes it creates a  shortcut file too - that you did not even know about it. Thus, you tend to open it without knowing it is actually a virus and can potentially expose to danger.

To simplify, Viruses and Worms have the ability to:
  • Hide the folder and create executable one
  • Hide Create Shortcut file
How did I get these Viruses and Worms?

Actually, a virus is dependent on user interaction. A virus will not run and execute if it is not triggered or led by the user. It is the sole responsibility of the user.

Moreover, you can get a virus in those infected PC workstations, or if not you can get it on that software that has additional add-ons that act like innocent but actually virus(more likely with Trojans).

  • Choose and install Trusted software (even if you trust sometimes it can be exploited by some hackers - so ideally the clean files are not necessarily safe because it could patch up virus code on it)
  • Install better Anti-Virus ( I recommend Nod32 works best ^_^  but it makes your PC slows)
Things might be Useful

When you have this infected USB FLASH Drive, this drive surely has an autorun.inf filed and attached a particular code of virus on it. So once you inserted your infected Flash Disk, the autorun.inf will be run first. Just pray that it has no code for the virus ^_^.

Hence, to prevent it some executing to infect the next victim.
  1. Disable your AUTORUN Feature.
  2. Install AUTORUN blocker software like USB Disk Security ( but if you already have Cool Antivirus it is not necessary to install this kind of USB protection software ) 
How to Restore Hidden Files Using CMD?  [ Solved ]

When you have infected flash disk, you will notice something's strange, your files and folders were hidden but then you can manually set it to unhidden if you use special built-in tools like CMD and Attrib command.

To show the Hidden Files/Folders

1. Click the Tools in the menu
2. Then Choose Folder Options...

Folder options
3. In the View Tab, and under the Hidden and Folders click the radio button show hidden files, folders, and drives.
  • Uncheck hide empty drive
  • Uncheck hide extension
  • Uncheck protected OS files

View Settings
3. Now, you can see all the hidden files and folders.
Uncheck Hide Extension for known File types
Yes, it can look like this below image. Sometimes, you exert effort and time to unhide folders and archives that are thousands of it. It is though frustrated and tedious work. But don't worry, the utility for that in Windows.
Hidden and Normal folders demo

To Restore Hidden Files and Folders

1. Click Start -> type CMD [ Display the CMD window ] or Goto Start -> all programs -> accessories -> command prompt
2. To view the hidden file, go to your drive first, type letter then colon (e.g., D: )
For me, my drive is letter J so -> j:
it shows the hidden folder
To restore it to the fundamental attribute
3. use the attrib command
> attrib -s -h -a -r /d /s

attrib tool

Attribute Command Parameters
  • -  means clears an attribute
  • H means hidden file attribute
  • S means system file attribute
  • A means archive file attribute
  • R means read-only file attribute
  • /S means process matching current folder and all subfolders
  • /D means process folders
Here're the complete details on ATTRIB
attrib options
With this command, it will restore your hidden files and folders. If it is still not showing your data, better clean your flash disk on another PC ( i recommend those PCs that was secured and safe ).

Tips on how to be safe and secure
  • Update your Antivirus 
  • Never install unknown software 
  • Disable your Autorun if necessary 
Be techy and enjoy! ^_^ Hit like, share,tweet, if it helps you thanks... ^_^


Featured Offers:

Share This:

Related Posts

3 comments to ''[Solved] HOW TO: Restore Hidden Folder / Files Using CMD? "

  1. I try a lot on how to restorea a hidden file. .so far so good. .and i well surely try this one. .thanks anyway

  2. It didn't restore ALL my files, what can should I do? :'(

  3. hello there.... thats quite very horrible situation especially it didnt recover important files, perhaps it has been deleted, moved or overwritten.

    if it doesn't restore all because it might been deleted, you can try recovering them instead.

    You can check this out: