Tutorials Navigation

Tutorials :: New :: Popular :: Top Rated

Tutorials: 18,357 Categories: 12

Total Tutorial Views: 42,545,056

How to Password Protect Files on Windows

Tutorial Name: How to Password Protect Files on Windows  

Category: PC Tutorials

Submitted By: Frog

Date Added:

Comments: 0

Views: 867

Related Forum: PC Building Forum

Share:

How to lock a file in Windows 10 / 11 with a password
[ Register or Signin to view external links. ]

1) Open notepad.
2) Paste the code from the spoiler.
3) Change the 'YOUR PASSWORD' section to the password that you want to lock the file with.
4) Save the file followed by .bat within the folder you wish to lock.
5) Go to the folder where you saved the new file.
6) There will be a folder in there called 'Private'.
7) Save your secret files within this folder.
8) Open the .bat file.
9) The command prompt with open showing a message. Simply type "y", then hit enter.
10) The next time you want to open the folder, you will be prompted to insert the password you have set.


The code
@ECHO OFF
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDPrivate
:CONFIRM
echo Are you sure to lock this 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 "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 password to Unlock Your Secure Folder
set/p "pass=>"
if NOT %pass%== YOUR PASSWORD goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDPrivate
md Private
echo Private created successfully
goto End
:End

Ratings

Current rating: 10.00 by 2 users
Please take one second and rate this tutorial...

Not a Chance
1
2
3
4
5
6
7
8
9
10
Absolutely

Comments

"How to Password Protect Files on Windows" :: Login/Create an Account :: 0 comments

If you would like to post a comment please signin to your account or register for an account.