In the last tutorial we shown you how to lock folders in windows 10 without any third party software or application but in that tutorial some users stated that they are unable to open the locked / hidden folders even giving the right password want their folder back, so with all respect we are going to give a small tip to get back their hidden or locked folders from this fuzz.
Here is the Tip :
Just imagine you locked the folders by following the last tutorial, but accidentally you forgot the password to open it. To open the locked folder you need the correct password, to get the correct password right click on the batch file you created for the locked folders and choose Edit, with this option the batch file is opened in the notepad with lines of code like given below.
cls
@ECHO OFF
title My Folder
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Secure 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 Secure "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter the Password to unlock folder
set/p "pass=>"
if NOT %pass%== windows10 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Secure
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Secure
echo Secure created successfully
goto End
:End
Here is that code i used windows10 is my password to unlock folders, you can also see your password in the green colored text area section. Now try that password and unlock your folders.
There is another issue also raised that even entering correct password some users are not getting to unlock after entering the correct password in the prompt window and after pressing enter key there is nothing happening.
To fix these kind of problem there is one solution just make some adjustments in the code.
Right click on the batch file and choose edit this will open the code in notepad ready to edit.
Note :: Before making changes in the code just select all and copy it and paste the code in the new notepad and save it as a text file. [ If anything goes wrong in the changes we can simply use the old code to make it back to first place ].
1. Below the :UNLOCK section
2. Select and Delete these lines
echo Enter the Password to unlock folder
set/p "pass=>"if NOT %pass%== windows10 goto FAIL
3. Now locate this line
echo Folder Unlocked successfully
just below of the attrib and ren line code
4. Now Select and Delete these lines
5. That's it now save this modified code by pressing Ctrl + S or select save from File menu.echo Folder Unlocked successfullygoto End:FAILecho Invalid password
Now double click on the batch file this time it will automatically close the prompt window and display the locked folders.
Note : After showing your locked folders simply delete the batch file to make sure accidentally using it again.