Windows operating system (OS) provides an easy way to hide files and folders on your hard drive to hide sensitive or personal information from being viewed by other people or being deleted accidently. In both cases, you require knowledge on how to hide them and unhide them when you need them. There are basically two approaches to it as stated below.
Method 1: By Changing Folder Properties
STEPS TO HIDE
- Right click on Folder you want to hide and check the Hidden box under Attributes and click Apply.
- Another window will pop up – asking if you want to “Apply changes to this folder, subfolders and files”. Don’t change anything there and click OK.
- It takes some time to change the attributes of the folder depending upon the size of the folder and then press OK. Now that folder is Hidden.
STEPS TO UNHIDE
- Click on Start –> Control Panel –> Folder Options.
- Click on the View Tab and check the radio button “show hidden files and folders” and press OK.
- This will enable you to see the hidden file.
Note: You can differentiate between normal and hidden folders. You can right click on the hidden folder and uncheck the hidden box and apply the changes to unhide it.
Method 2: By using DOS Command – attrib
We will use the DOS Command “attrib” to accomplish the same task.
- Click on Start –> Run –> cmd
- For example, I have a directory called “Perl” in root directory and I want to hide that directory with the help of attribute command.
- Change the directory one level back to the directory you want to hide.
- Type attrib +h Perl and hit Enter. That’s all, Perl folder is hidden now. You can type dir on the command prompt and you will not see Perl there in root directory.
- Type attrib –h Perl to unhide the folder.
Little more about attrib:
attrib is a DOS command to change the attribute of folder and files at command prompt. + and – are used to set and clear the attrib respectively.
Available attributes are:
- R – Set the file Read-Only
- A – Set Archive attribute to files.
- S – System file attributes
- H – Hidden file attributes.
Note: attrib will show attributes of all the files in the current directory if typed without any switches.