|
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
|