Folder Lock:
                Normally we will use folder lock software to protect a folder in our pc. If the folder is in the external storage like pen drive it is not preferable, because when we use the same pen drive in another pc we may not able to access the folder as the folder lock software is not available in this pc.
           Below is the small tip so that we can lock or unlock the folder by running .exe file in any system and also password protected.
 Below is the steps to create folder lock exe file:
1)      Copy and paste the below code in a notepad
cls
@ECHO OFF
title Folder Private
if EXIST No-access 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 No-access
cacls No-access /p everyone:N
echo Folder locked
pause
goto End
:UNLOCK
echo Enter password to unlock folder
set /p "pass=>"
if NOT %pass%==PASSWORD goto FAIL
cacls No-access /p everyone:F
ren No-access Private
echo Folder Unlocked successfully
pause
goto End
:FAIL
echo Invalid password
pause
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
pause
:End

        2) Replace  PASSWORD  with u r password in the 23rd line .
        3) Save the file as folderlock.bat
        4) For security purpose u can convert the .bat file to .exe or else u can use the same.
Note:  The above code will only work for pendrive with NTFS File system.
For FAT32  file system use the below code.
Quote: 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}"
echo Folder locked
pause
goto End
:UNLOCK
echo Enter password to unlock folder
set/p "pass=>"
if NOT %pass%== PASSWORD    goto FAIL
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Private
echo Folder Unlocked successfully
pause
goto End
:FAIL
echo Invalid password
pause
goto end
:MDLOCKER
md Private
echo Private created successfully
goto End
:End