HRM Tech

Thursday, October 19, 2017

How to create a folder locker by using cmd



Copy the following to Notepad. 


Then add the file name as .bat and save it, like folder locker.bat







cls
@ECHO OFF
title Folder Locker
if EXIST "Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" goto UNLOCK
if NOT EXIST Locker 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 Locker "Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"

echo Folder locked
goto End
:UNLOCK

@echo off
set "psCommand=powershell -Command "$pword = read-host 'Enter the Password to unlock folder' -AsSecureString ; ^
     $BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
           [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
if not "%password%"=="12345" goto Fail

ren "Locker.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End

:End



















Share:

My videos



How to videos download from fb





How to turn footnote line to right side in word





How to create a unnamed folder in windows 





How to create a password in MS word





How to make a folder Lock Without Softwere







How to fix "Error 1075: The dependency service does not exist or has been marked for deletion" 






HRM Tech

Followers

Blog Archive

Random Posts

randomposts

Recent Posts

recentposts

Facebook