How to hide files and folders securely using Command Prompt?


How to hide files and folders securely using Command Prompt?


You may want to hide some of your private files and folders from friends or parents, it is easily done using softwares like Folder Lock. But if you want to do it without using any kind of softwares then you can use Command Prompt. Let us do it step by step, for e.g I want to hide Movies folder on my pc.
Hide Folders: Step by Step Procedure

Step 1: Click on ‘Start->Run’ or Press ‘Windows Button + R’.
Step 2: Now enter ‘cmd’ in it. And Press OK to open Command Prompt window.
Hide Files-Folders using cmd
Step 3: Enter the path to your file or folder which you want to hide. As it can be seen by default the command prompt window shows ‘C:\Users\home’ in Windows 7. In our case it is ‘E:\Movies’ which we want to hide, so first we enter the drive it is located as ‘E:’ .
Hide Files Folders using cmd
Step 4: You can view the directory and sub-directories entering ‘dir’ command.Command Prompt Directory
Step 5: Now final step to hide the file, enter ‘attrib +s +h’ followed by the name of your folder or files and press enter, in our e.g the final code to enter is ‘attrib +s +h Movies’ and it is done.
Command Prompt attrib
Understanding the codes used:
  • attrib : It changes the attributes of the file or folder.
  • dir : It displays files and folders in the directory.
  • attrib +s +h : It adds System and Hidden attribute to the file or folder.
Only ‘+h’ attribute is enough to hide a file/folder but that file would be visible when ‘Show Hidden files folders and drives’ option is checked in Tools->Folder Options in My Computer. ‘+s’ adds system attribute so even if the above mentioned option is checked your file would still not be seen.
However you can view your folder/file by directly typing the address of file in address bar in My Computer; In our e.g it is ‘E:\Movies’, typing it in address bar would show me its contents.
How to Unhide Files/Folders:
Enter ‘attrib -s -h’ followed by file/folder name and enter, so in our e.g it would be ‘attrib -s -h Movies’.
Have Fun hiding your private files ;)

No comments:

Post a Comment