The below code in MS DOS will help you to lock folder/files without using any software. Though it can be easily cracked, will help you to lock to beginners of windows.
Copy this below code to a notepad and save it as Locker.bat Replace this line "if NOT %pass%==password goto FAIL" with required password of your own. Double click the Locker.bat file, this will create a folder calling "locker" on the current folder. Place the file that to be locked on the newly created "locker" folder. Now, again double click the Locker.bat file. This will make the locker folder to hide thereby locking the files inside them. To Unlock the files, double click the Locker.bat file and give the correct password.
cls
@ECHO OFF
title Folder Locker
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure u 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 Locker "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 goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End
Hope this would help you to lock folder/files without using any software in Windows
This really works! \m/(*_*)\m/
it does works. however, i do not remember the password. how to retrieve?
hey dude its good but if any one open the locker.bat file in edit mode then he can see my password and he also can change the password
hey its good n ron i have got d solution to ur idea
I really like it
You don't need to worry about the password, if you forget or the .bat file is lost. Just do these simple steps to regain your files... Step 1: Goto the drive where you have made the folder hidden for example: i used d drive, so gotot d:/ Step 2: In the menu bar, goto tools folder options. Step3: In view tab, choose show hidden files or folders and uncheck the hide protected operating system files (recommended). Step4: You will get all the hidden files. There you can find a control pannel icon with the name Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}, just rename it what ever name you want and you will get your files back. Try and Checkit out!
i forgot the password. with out changing the password in the batch file . and it in asking ENTER PASSWORD TO UNLOCK THE FOLDER
good this work good
How to retrieve the password if i lost the bat.file and i want to unlock the folder. I already followed the step below and got show the icon for control panel. My question is How to retrieve the password if i lost the bat.file? Step 1: Goto the drive where you have made the folder hidden for example: i used d drive, so gotot d:/ Step 2: In the menu bar, goto tools folder options. Step3: In view tab, choose show hidden files or folders and uncheck the hide protected operating system files (recommended). Step4: You will get all the hidden files. There you can find a control pannel icon with the name Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}, just rename it what ever name you want and you will get your files back. Thanks
May i know what is ren lockfile. what purpose of using this?
thnks...i appreciate ur help...^-^..bt could any 1 tell me wat .bat is n how can i noe more tricks like dis 1?...thnks in adv 4 ur answers...
my pc accepts wrong password also...
there is the problem with folder if the someone can delet control pannel folder then..................?
Hi... when I open the locker.bat and enter the password, nothing happens, I cant see the folder. I made a Winrar archive and saw a folder named "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}', i tried to extract it but it said 'No archives found', when I open this folder it has nothing in it, however I had locked many movies in it. Please help me guyz... :(
use the cacls command it actually locks users out of it find out how to use it before using it.also locks programs.
some one has deleted the locker.bat and i cant find all the folders i locked it , so what i have to do now, any one can help me ? please send your answer to me ....
forgot my password, how to open folder pls give me best solution.
how to lock a folder using MS DOS command. Pls explain with example
how to lock a folder using MS DOS command with example by using password
thanks for the help.. it really works
just learn how to read ms dos and this is very simple i mean this langauge is a million times easier than english depending on how good your memory is. i learned everything about it in a couple weeks
and i think some of you are getting the impression that 21EC2020-3AEA-1069-A2DD-08002B30309D is the password defaultly, that has to do with file location and crap password is what he has the password set as and then you change it it boils down to it if you don't read any ms dos and you change somthin on this code you'll probley screw it up and "rams" the easiest to recover the files is use the del /drive/folderlocation/name command on the batch file and all your files should return
hai due its not useful.. anybody rename your locker folder with any name it will show all the content
I forgot my password :( can i change it ??
convert bat into exe file then no one can be able to see password
how i can give password to my computer drive in command prompt and unlock drive at the time of need.......please explain with command.....
Whats New : - Save/Load password. - Can open folder in anywhere in same drive. - Rename folder. - Super hidden and encrypted folder. - Now try this . . . @ECHO OFF COLOR 1F MODE 47,6 TITLE Folder Locker SET A=%MyFiles% SET B=C2F41D69-E2A7-5795-89E4-00805FE4081D SET C=D4E221D2-3A5B-1069-52DD-06002B3A3098 SET D=E65D24D8-98B5-68C0-BB82-010D30BDCE0C SET E=F89CDCE2-B7C3-28FF-A9F0-007A0060FC34 IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%" ATTRIB +H +S +A "%A%\%B%" >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%E%" CACLS "%A%\%B%\%E%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" FOR /F "TOKENS=*" %%F IN (%A%\%B%\%D%) DO SET "FD=%%F" IF EXIST "%A%\%B%\%E%" FOR /F "TOKENS=*" %%P IN (%A%\%B%\%E%) DO SET "PS=%%P" IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%\%E%" CACLS "%A%\%B%\%E%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%\%C%" GOTO CONFIRM0 IF NOT EXIST "%A%\%B%\%C%" GOTO CONFIRM2 :CONFIRM0 IF EXIST "%A%\%B%\%E%" GOTO CONFIRM1 IF NOT EXIST "%A%\%B%\%E%" GOTO NEWPASSWORD :CONFIRM1 IF EXIST "%A%\%B%\%C%" GOTO UNLOCKCONFIRM IF NOT EXIST "%A%\%B%\%C%" GOTO LOCKCONFIRM :CONFIRM2 IF EXIST "%FD%" GOTO CONFIRM0 IF NOT EXIST "%FD%" GOTO CREATE :CREATE IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL TITLE Folder Locker - [CREATE FOLDER] CLS ECHO Are you sure want to make new folder [Y/N]? ECHO. SET /P "CHOICE=> " IF NOT DEFINED CHOICE GOTO CREATE IF /I "%CHOICE%" EQU "Y" GOTO CREATEFOLDERNAME IF /I "%CHOICE%" EQU "N" EXIT ECHO. ECHO Invalid Choice!!! PAUSE>NUL CLS GOTO CREATE :CREATEFOLDERNAME CLS ECHO Type name for your new folder. ECHO. SET /P "FOLDERNAME=> " IF NOT DEFINED FOLDERNAME GOTO EMPTY4 GOTO CREATING :CREATING CLS ECHO Please Wait . . . IF NOT EXIST "%A%\%B%" MD "%A%\%B%" >NUL IF EXIST "%A%\%B%" ATTRIB +H +S +A "%A%\%B%" >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL IF NOT EXIST "%FOLDERNAME%" MD "%FOLDERNAME%" >NUL IF NOT EXIST "%FOLDERNAME%" GOTO UNABLECREATE IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" ATTRIB -H -S -A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" ECHO Y|DEL "%A%\%B%\%D%" >NUL IF EXIST "%FOLDERNAME%" ECHO.%FOLDERNAME%>"%A%\%B%\%D%" IF EXIST "%A%\%B%\%D%" ATTRIB +H +S +A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:N /E >NUL IF NOT EXIST "%A%\%B%\%E%" GOTO SETPASS IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS ECHO Folder created successfully . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :SETPASS IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS ECHO Folder created successfully . . . ECHO. ECHO Press any key to set password . . . PAUSE>NUL GOTO NEWPASSWORD :UNABLECREATE CLS ECHO Unable to create folder . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :EMPTY1 ECHO. ECHO Empty Password!!! PAUSE>NUL GOTO CHANGEPASSWORD2 :EMPTY2 ECHO. ECHO Empty Password!!! PAUSE>NUL GOTO NEWPASSWORD :EMPTY3 ECHO. ECHO Empty Name!!! PAUSE>NUL GOTO RENAME :EMPTY4 ECHO. ECHO Empty Name!!! PAUSE>NUL GOTO CREATEFOLDERNAME :EMPTY5 ECHO. ECHO Empty Name!!! PAUSE>NUL GOTO CREATENAME :LOCKCONFIRM IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL TITLE Folder Locker - [LOCK FOLDER] CLS ECHO Type "RENAME" for rename your current folder. ECHO Type "CHANGE" for change your password. ECHO Are you sure want to lock your folder [Y/N]? ECHO. SET /P "CHOICE=> " IF NOT DEFINED CHOICE GOTO LOCKCONFIRM IF /I "%CHOICE%" EQU "Y" GOTO LOCKING IF /I "%CHOICE%" EQU "N" EXIT IF /I "%CHOICE%" EQU "CHANGE" GOTO CHANGEPASSWORD1 IF /I "%CHOICE%" EQU "RENAME" GOTO RENAME SET /P CHOICE=Invalid Choice!!! CLS GOTO LOCKCONFIRM :LOCKING CLS ECHO Please Wait . . . IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%C%" CACLS "%A%\%B%\%C%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%C%" ATTRIB -H -S -A "%A%\%B%\%C%" >NUL IF EXIST "%A%\%B%\%C%\*" ATTRIB -H -S -A "%A%\%B%\%C%\*" >NUL IF EXIST "%A%\%B%\%C%\*" ECHO Y|DEL "%A%\%B%\%C%\*" >NUL IF EXIST "%A%\%B%\%C%" RD "%A%\%B%\%C%" >NUL IF EXIST "%FD%" MOVE "%FD%" "%A%\%B%\" >NUL IF EXIST "%A%\%B%\%FD%" REN "%A%\%B%\%FD%" "%C%" >NUL IF EXIST "%A%\%B%\%C%" ATTRIB +H +S +A "%A%\%B%\%C%" >NUL IF EXIST "%A%\%B%\%C%" CACLS "%A%\%B%\%C%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS ECHO Folder locked successfully . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :RENAME TITLE Folder Locker - [RENAME FOLDER] CLS ECHO Type new name for your current folder. ECHO. SET /P "NEWNAME=> " IF NOT DEFINED NEWNAME GOTO EMPTY3 IF EXIST "%FD%" REN "%FD%" "%NEWNAME%" IF NOT EXIST "%NEWNAME%" GOTO UNABLERENAME IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" ATTRIB -H -S -A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" ECHO Y|DEL "%A%\%B%\%D%" >NUL IF NOT EXIST "%A%\%B%\%D%" ECHO.%NEWNAME%>"%A%\%B%\%D%" IF EXIST "%A%\%B%\%D%" ATTRIB +H +S +A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS ECHO Folder renamed successfully . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :UNABLERENAME CLS ECHO Unable to rename folder . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :CREATENAME IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL TITLE Folder Locker - [CREATE NAME] CLS ECHO Folder name is not set, type new folder name. ECHO. SET /P "NEWNAME=> " IF NOT DEFINED NEWNAME GOTO EMPTY5 IF NOT EXIST "%NEWNAME%" MD "%NEWNAME%" >NUL IF NOT EXIST "%NEWNAME%" GOTO UNABLECREATENAME IF EXIST "%NEWNAME%" RD "%NEWNAME%" >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%D%" ATTRIB -H -S -A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" ECHO Y|DEL "%A%\%B%\%D%" >NUL IF NOT EXIST "%A%\%B%\%D%" ECHO.%NEWNAME%>"%A%\%B%\%D%" IF EXIST "%A%\%B%\%D%" ATTRIB +H +S +A "%A%\%B%\%D%" >NUL IF EXIST "%A%\%B%\%D%" CACLS "%A%\%B%\%D%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS GOTO UNLOCKING :UNABLECREATENAME CLS ECHO Unable to create folder name . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :CHANGEPASSWORD1 IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL TITLE Folder Locker - [CHANGE PASSWORD] CLS SET PASSWORD= SET /P "PASSWORD=Enter Old Password : " IF NOT DEFINED PASSWORD GOTO CHANGEPASSWORD1 IF "%PASSWORD%"=="%PS%" GOTO CHANGEPASSWORD2 ECHO. ECHO Invalid Password!!! PAUSE>NUL GOTO CHANGEPASSWORD1 :CHANGEPASSWORD2 CLS ECHO Enter Old Password : %PS% ECHO. SET NEW= SET /P "NEW=Enter New Password : " IF NOT DEFINED NEW GOTO EMPTY1 IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%E%" CACLS "%A%\%B%\%E%" /P EVERYONE:F /E >NUL IF EXIST "%A%\%B%\%E%" ATTRIB -H -S -A "%A%\%B%\%E%" >NUL IF EXIST "%A%\%B%\%E%" ECHO Y|DEL "%A%\%B%\%E%" >NUL IF NOT EXIST "%A%\%B%\%E%" ECHO.%NEW%>"%A%\%B%\%E%" IF EXIST "%A%\%B%\%E%" ATTRIB +H +S +A "%A%\%B%\%E%" >NUL IF EXIST "%A%\%B%\%E%" CACLS "%A%\%B%\%E%" /P EVERYONE:N /E >NUL IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL CLS ECHO Password has been changed . . . ECHO. ECHO Press any key to exit . . . PAUSE>NUL EXIT :NEWPASSWORD IF EXIST "%A%\%B%" CACLS "%A%\%B%" /P EVERYONE:N /E >NUL TITLE Folder Locker - [NEW PASSWORD