Password Protected folder in WIndow (XP, 7, 8, 8.1, 10)
Do you want to lock your folder and protect it from unwanted viruses and unwanted people. In this short tutorial you will learn how to lock your folder with password using CMD. This tutorial is for windows user only. The code is given below.
Created by: Imran Khan
Play List: Podina Tips and Tricks
Code:
======================================================
cls
@ECHO OFF
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 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 "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 folder
set/p "pass=>"
if NOT %pass%== PASSWORD_GOES_HERE 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
:MDLOCKER
md Private
echo Private created successfully
goto End
:End
======================================================
The Author
If you've found this article helpful or interesting and think others would benefit from reading it, please share! Thanks alot for reading it!
I am Imran Khan, and I am a blogger, Youtuber. If you think that my content has been valuable to you and you got some knowledge from my content then, please share my content with your friends and keep this content active. If you think that my content need improvemnt then please leave your valuable feedback.
Imran Khan |
I am Imran Khan, and I am a blogger, Youtuber. If you think that my content has been valuable to you and you got some knowledge from my content then, please share my content with your friends and keep this content active. If you think that my content need improvemnt then please leave your valuable feedback.
EmoticonEmoticon