Tutorials Navigation
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. ]
[ 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
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
Comments
Related Tutorials
- 01. Emulating Xbox 360 on PC for Running COD4 With Mods(3,666)
- 02. How to: Matrix Numbers | Batch File(1,956)
- 03. How to play Socom 2/3/ and Combined Assault on PC(6,884)
- 04. Modern Warfare 2 Vac Ban Bypass Tutorial(6,253)
- 05. How to embed an image on TheTechGame(3,141)
- 06. [PC] NIOH 2 OTHER USER SAVE RESIGN(13,094)
- 07. Host bot lobbies! Full Tutorial!(11,631)
- 08. Unban yourself [Plutonium BO2](14,317)
- 09. Fall Guys - How to Change Your Name Color on Fall Guys(8,411)
- 10. Best Crosshair Settings for Valorant(6,552)
- 11. Othercide The Surgeon Boss Guide(2,570)
- 12. Othercide Remembrances Unlock Guide(4,518)
- 13. Othercide Beginners Tips and Tricks(2,737)
- 14. How to Fix Grounded Crashes, Loading Time, Low FPS and Other(4,886)
- 15. How To Play Halo 3 With PS4 Controller On PC(7,617)
"How to Password Protect Files on Windows" :: Login/Create an Account :: 0 comments