My Blog

It's all about Information, tricks and knowledge..

How to create password for folder with CMD (Without Software)

No comments

Now a day’s people have to secure their files or personal things in computer. People can protect their folder with password by using certain software’s. But, here you can use folder lock without any software by just using CMD. Below you can see the demo and CMD .bat file in attachment. 

Open the Text document, now paste the following code into the contents of the document:
title Folder Private
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Private goto MDLOCKER
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.
ren Private "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== yourpassword 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
echo Invalid password
goto end
md Private
echo Private created successfully
goto End

Change the yourpassword text to the password you want to set before conversion. Now go ahead and save the file as pass.bat. Now run your batch file by double clicking on it. It create the folder “Private” first time you run it. This is the folder that you can store all your secret files. When you have finished adding all your stuff in to the Private folder, run pass.bat again. This .bat file is not safe and any other person can edit it. They can view the password and open your private folder. So, better that you can convert you bat file into exe file. It will protect your folder and it is act as a software.


No comments :

Post a Comment