1 Replies - 1296 Views - Last Post: 30 May 2010 - 07:59 AM

#1 ayman_mastermind  Icon User is offline

  • human.setType("geek");
  • member icon

Reputation: 127
  • View blog
  • Posts: 1,860
  • Joined: 12-December 08

Folder Locker in batch for windows

Posted 03 February 2009 - 11:30 AM

Description: after saving your batch file in .bat, double click the batch file, then a folder called Locker will be created, put the files that you want to hide inside the folder, after that, run the batch file, it will ask if you are sure you want to lock the file,choose yes for y and then the folder and it's constituents will be hidden, to access the locked folder later, run the batch file and type in the password so that the folder becomes unlocked and visible, in this case, the password is the word password,you can modify the program to change it... a program that locks a folder which becomes accessible only through a 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%==type your password here 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


Is This A Good Question/Topic? 0
  • +

Replies To: Folder Locker in batch for windows

#2 sh1n3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 24
  • View blog
  • Posts: 164
  • Joined: 22-April 10

Re: Folder Locker in batch for windows

Posted 30 May 2010 - 07:59 AM

You can use '/i' switch to ignore case in if-else conditions.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1