How to hide/unhide any folder in PC

If you want to lock or hide any folder -
        1. Create a folder say "MyFolder" on desktop or in any drive.
2. Create a text file and paste this script -

cls 
@ECHO OFF 
title Folder Private 
if EXIST "HTG Locker" goto UNLOCK 
if NOT EXIST Private goto MDLOCKER 
:CONFIRM 
echo Are you sure you want to lock the folder(Y/N) 
set/p "cho=>" 
if %cho%==Y goto LOCK 
if %cho%==y goto LOCK 
if %cho%==n goto END 
if %cho%==N goto END 
echo Invalid choice. 
goto CONFIRM 
:LOCK 
ren Private "HTG Locker" 
attrib +h +s "HTG Locker" 
echo Folder locked 
goto End 
:UNLOCK 
echo Enter password to unlock folder 
set/p "pass=>" 
if NOT %pass%==MyPASSWORD goto FAIL 
attrib -h -s "HTG Locker" 
ren "HTG Locker" Private 
echo Folder Unlocked successfully 
goto End 
:FAIL 
echo Invalid password 
goto end 
:MDLOCKER 
md Private 
echo Private created successfully 
goto End 
:End

Note - Replace MyPASSWORD with the your password.

        3. Save the file as Locker.bat (file type - ALL TYPES)
4. Click on Locker.bat (run the Locker batch file)
5. You will see a folder named 'Private' is created.
6. Now place all your files in this Private folder and run locker.bat again
7. This time you will be asked if you sure that you want to lock the folder,
            press the “Y” key or hit enter key to lock your folder.
8. You will see that your Private folder quickly disappears.
9. If you run the script yet again, you will be prompted for a password.
10. Enter the correct password and you will see your Private folder again
11. To update the password, right-click on Locker.bat and edit.

Comments

Popular posts from this blog

How to create math quiz application using visual studio 2010