How to Completely Hide Folder / File in Windows Easily

Howto Hide File Folder
Howto Hide File Folder

Hide Pictures / Hide Folder / Hide any File using this Manual Technique

In this modern world, almost every documentation work has been done on the computer systems. They maybe in the Text, Videos, or in images format. Some of these files are really very confidential for us and we need them to be in any safe place, away from others. Particularly when we have to share our PC / Laptop with others. There is always a worry to make them unavailable for others. Between all these worries, sometimes they get deleted by mistake or in hurry. To avoid such mistakes, here we are presenting an ultimate solution to HIDE them.

In fact, majority of the population uses Windows Operating System on their computers, specially in India. What about u ?, using the same or not. Actually, Windows has a built-in function to hide the files. But to tell you the truth, that buit-in Windows function can’t hide any of your files and folders permanently. You maybe wondering, Why?, simply because a lot of people knows about that option and can unhide it by using 2-3 easy steps. We will never recommend this unsafe method to hide any of your’s confidential data / files.

Well in this case, only two options left for us. One is to use any tool / softwares for this particular task, the other is what we are going to discuss it here. Prior to starting the demonstration, let we give a short note about the doings for this procedure. Here, we will just use Windows in-built “command-prompt” & “Notepad” to get desired outcome. Mainly, Developers do this task in this way. Actually, we have further divided it into two sections ( Section A and Section B ).

A)- Using Command Line under Command Prompt:

Every Computer Literate person knows about this Windows Command Prompt. You can have access to it by going to Start Menu – All Programs – Accessories –  Command Prompt. Although, there are many commands available for this CMD (Command Prompt), but TODAY, we only will use ATTRIB command in this demonstration. Here goes the complete procedures you have to undertake to get it done.

1)- The first thing you have to do is to note the location / path of the file / folder you wish to hide. You can easily get the same by Right Clicking file / folder and opting the Properties.

2)- Now you have to copy the location under properties, then adding the file-name after it will be the complete location (we needed here) for that file / folder. (Don’t panic, for clarifications check the image below).

howto find file location

For Easy Understandings, If you are willing to hide a docx file named as “client-names” which resides in “D:\Important\Clients” folder, the the complete location for this act will be “D:\Important\Clients\client-names.docx“. If you want to do this for any folder, repeat the same steps to get complete location, location + folder name. We hope, this now have been much more clearer to you.

3)- Now, Go to the Start Menu>All Programs>Accessories, find Command Prompt there, Right Click on it and select / click “run as administrator“. If you have already logged in as ADMINISTRATOR, It may ask you to confirm this action. OTHERWISE you have to supply Administrator’s credentials to perform this.

4)- Congo, now we are on the main stage. We have to use the ATTRIB command (mentioned earlier). The syntax you have to use will be:

attrib +h +s file/folder location.

In this case / demonstration, the command will be:

attrib +h +s D:\Important\Clients\client-names.docx

Executing Attrib Command
Executing Attrib Command

Here, you have to remember that the Command Prompt Window doesn’t allow us to copy/paste any text. We have to do it by manual typing.  Now, hit ENTER and witness some MAGIC. Your file is hidden now, nobody (except you) will be able to find / view your important file and we are 100% sure about it.

How to Show Hidden Files

To unhide the hidden files for any future use, follow all the above explained steps. There is just a minor change in Step-4, Replace “+” with “-“ in the command line syntax and this will unhide your file. Please check the format below:

attrib -h -s file or file/folder location.

OR

attrib -h -s D:\Important\Clients\client-names.docx (For file name used in this demonstration)

In easy wordings to remember it always, The PLUS “+” sign will hide and the MINUS “-” sign will unhide.

B)- Using a Batch Program (.bat file)

Same like the first method we had explained above, this too uses the same ATTRIB command. The is the easiest method as we have created a program to do all the doings automatically. Here, We will use Notepad to save the provided program in text format. Actually, Notepad is commonly utilized for programming needs. Yeah, we are talking about BATCH (official programming language for Windows). Just and just for you, we have created a simple batch program, which will help you to HIDE any desired file / folders. All the given steps are very easy, you again just have to type the “complete location” of the file / folder.

Below are the steps to HIDE your file / folder using this BATCH Program:

1)- Just open NOTEPAD from Start Menu>All Programs>Accessories>Notepad. Copy Paste the entire Batch Program code provided below in it.

@echo off
title Hide File / Folder Program
color 0b
echo Menu List (Select your options):
echo 1. Hide Your Files
echo 2. Unhide Your Files
echo 3. Exit
set /p option=Choose any one Option ( 1,2,3 ):
if ‘%option%’==’1’ goto hide
if ‘%option%’==’2’ goto unhide
if ‘%option%’==’3’ goto exit
if any %option%== goto wrong
:hide
set /p floc=Please provide the file location to HIDE:
attrib +s +h %floc%
echo Successfully Completed! HIDE Operation, Press any key to exit.
pause>nul
exit
:unhide
set /p floc=Please provide the file location to UNHIDE:
attrib -s -h %floc%
echo Successfully Completed UNHIDE Operation, Press any key to exit.
pause>nul
exit
:exit
echo Really want to EXIT ? Press any key to exit.
pause>nul
exit
:wrong
echo Sorry, You have given some wrong Input. Please Try Again!
pause>nul
exit

2)- Now, go to File>Save-As, and name this program as “Hide_My_File.bat”. Just make sure that the file name is having “.bat” in the END. This “.bat” is the file extension for this BATCH Program. (Check out in the figure below)

Saving File
Saving File

3)- Save it to your Desktop. Offcouse, you can later move it to any safe location of your choice.

4)- Now hit the save button. Finally, right click this saved “Hide_My_File.bat” file, choose “run as administrator” (You always have to run this file using “run as administrator” option ELSE it may not work properly).

Hide Folder Program
Hide File / Folder Program

Once it gets opened, You will be provided some options to select. You have to choose the option accordingly, follow all the on screen instructions and the JOB will get done within seconds. You just have to supply the Complete location / Path of the file you wish to Hide OR Unhide. We hope, you still remember how to get the file path / location. (explained earlier)

Explanations for the BATCH Program

As you can see, the coding in the program is very easily understandable, written in simple English language. Still, some of you may find this hard to understand. No worries 🙂 , We are going to explain these only used 4 commands. Below are their use with clarifications:

  • set /p: This command helps in getting the input from user and to store the value in variable. In the code, floc and option have been used as Variables.
  • if condition: In the code, this “if” command will check the correctness of user input with certain numbers (here we have used 1,2 and 3) and if found correct, it will execute the labeled tags following “goto” command.
  • attrib command: As explained earlier, ATTRIB is the principal command in the code, it will be used to hide & un-hide files using PLUS “+” & Minus “-” symbols.
  • % Operator: To carry the variable & to print it wherever needed, this % operator is used. Here, this will help to add provided user input (from variables) to the ATTRIB command.

Final Thoughts about this.

So here we have provided the best ways to HIDE / UNHIDE your file / folder without using any tool / software. To hide any of your confidential data / file, you can try any of the method explained above. Important: Make this a note, to remember the complete file location of the hidden file / folder. Actually, it will be near to impossible if you lost the file location from your mind. For the best practice, maintain a record for these doings OR Create a special folder in which these confidential / hidden files would reside. It will help if you lost the file location by using:

attrib -h -s Folder-Name\*.*

Here, asterisk ( * ) means anything. For easy understandings, the above command will unhide all the files of that Folder.

We hope, You are getting ready to HIDE your confidential data files using this technique. If you have any doubts related to this, feel free to catch us anyday / anytime. We are always here in your service. Keep Visiting a2z infomatics.

GOD Bless Everybody.

Scroll to Top