1. Welcome to PHCorner Forums. Take a moment to Sign up and gain unlimited access and extra privileges that guests are not entitled to, such as:

    All that and more! Registration is quick, simple and absolutely free. Join our community today!

Tutorial How to restore hidden files using cmd

Discussion in 'Windows Tools & Tips' started by La Freak, Apr 7, 2013.

  1. La Freak

    La Freak Support Team Staff Member Support Team

    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 a simple way - by using only CMD. Today, there a lots of virus and worms that affects many computers across the globe. Some of it annoy every pc user especially when the worm/virus hides folders and sometimes it create a copy an executable file with the same folder name.
    Plugging to Another PC Does not Guarantee Protection
    Normal users sometimes did not noticed that they have been actually infected especially on their flash disk. Well, flash disk is a common way to save, transfer and backup important files like documents. Just plugging your USB drive to another PC does not guarantee for your security and protect your disk to virus and worms unless otherwise the user that you have been inserted your disks was highly techie or they have better Anti-Virus. So be careful. Thus,
    • Your PC does not 100% secure
    • Your Friend's PC does not guarantee protection too
    Virus Hide Folders( sometimes creates shortcut and executable file )

    Please or Register to view linksThe most common virus experienced by the user is that, this virus hides your folders and then make a copies that have the same folder icon and folder name but in only differs on file type because it create an executable one. (.exe) and sometimes it creates shortcut files too - that is you did not know that it is only a shortcut icon for the virus to be executed that start effecting
    the PC.
    To simplify, Virus:
    • Hides the folder and create executable one
    • Hides Create Shortcut file

    How did I get these Viruses and Worms?
    Actually, virus is dependent on user interaction. Virus will not run and execute if it is not trigger or run by the user. You can get virus in some infected PC workstation, or if not you can get it on those software that has this additional add-ons and viruses.
    • Trust software (even if you will trust sometimes it can be exploited by some hackers - so the clean files will have a virus code on it )
    • Install better Anti-Virus ( I recommend Nod32 works best ^_^ )

    Things might be Useful
    When you have this infected USB Drive, this drive has an autorun.inf file, but it has the virus on it. So once you inserted your infected Flash Disk, the autorun.inf will be run first and with its source virus. So, 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?
    When you have infected flash disk that is your folders were hidden, then you can manually set it to unhidden if you use CMD and Attrib command.

    To show the Hidden Files/Folders
    1. Click the Tools in the menu
    2. Then Choose Folder Options...


    3. In the View Tab,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

    3. Now, you can see all the hidden files and folders.


    Yes, it can look like this below. Sometimes, you exert effort and time if you have many files and folders to unhidden. But dont worry theres a utility for that in Windows.


    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 (eg D: )
    For me, my drive is letter J so -> j:


    To restore it to the original attribute
    3. use the attrib command
    > attrib -s -h -a -r /d /s


    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
    Heres the complete details on ATTRIB​
    with this command, it will restore your hidden files and folders. If it is still not showing your files, better clean your flash disk on another PC ( i recommend those pcs that were secured and safe ).

    Tips on how to be safe and secure
    • Update your Antivirus
    • Never install unknown software
    • Disable your Autorun if necessary

    Be a techy and enjoy! ^_^ Hit like,share,tweet, if it helps you thankssss... ^_^ ​
  2. nice ts, keep sharing. pero may mga mini softwares na nagawa para mas madali yang procedure, lalo na sa mga flash drives.. :D
  3. La Freak

    La Freak Support Team Staff Member Support Team

    that's right sir thanks for your sharing :)
  4. Thanks for sharing idol :blackalien:
  5. Keep on posting boss :)
Tags / Keywords: