Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

File Safe?


Autlos
 Share

Recommended Posts

You wish to keep you file safe from peering eyes?Well use this code.Not created by me, of course.

-NOTE-
Install on notepad saved as (name here).bat
Change "%pass%" to your password inside the 2 percent sign.

```
cls
@ECHO OFF
title Folder Personal
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Personal 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 Personal "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}" Personal
echo Folder unlocked successfully
goto End
:FAIL
echo Invalid password
goto UNLOCK2
:FAIL2
echo Invalid password
goto end
:MDLOCKER
md Personal
echo Folder created successfully
goto End
:UNLOCK2
echo Last chance to enter correct password to unlock folder
set /p "pass=>"
if not %pass%==password goto FAIL2
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Personal
echo Folder unlocked successfully
:End
```
if does not work I'll post tomorrow but for now G'Night.
Link to comment
Share on other sites

fixed, added command line parameters. execute in command line with "start [whatever you saved this to].bat [password] [directory]"
also prompts you if you want to modify another file afterwords.
```
cls
@echo off
set vPas=%1%
shift
set vDir=%1%

:STARTUP
cls
echo password: %vPas%, Directory: %vDir%
echo Is this right?(Y/N)
set/p "cho=>"
if %cho%==Y goto FIRSTCHECK
if %cho%==y goto FIRSTCHECK
if %cho%==n goto END
if %cho%==N goto END

:FIRSTCHECK
title Folder %vDir%
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST %vDir% 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 %vDir% "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto CONFIRMOPENNEW
:UNLOCK
echo Enter password to Unlock folder
set /p "pass=>"
if NOT %pass%==%vPas% goto FAIL
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" %vDir%
echo Folder unlocked successfully
goto CONFIRMOPENNEW
:FAIL
echo Invalid password
goto UNLOCK2
:FAIL2
echo Invalid password
goto end
:MDLOCKER
md %vDir%
echo Folder created successfully
goto CONFIRMOPENNEW
:UNLOCK2
echo Last chance to enter correct password to unlock folder
set/p "pass=>"
if not %pass%==%vPas% goto FAIL2
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" %vDir%
echo Folder unlocked successfully
:CONFIRMOPENNEW
echo Modify another folder?
set/p "cho=>"
if %cho%==Y goto OPENNEW
if %cho%==y goto OPENNEW
if %cho%==n goto END
if %cho%==N goto END
:OPENNEW
echo Directory:
set/p "vDir=>"
echo Password:
set/p "vPas=>"
echo Directory: %vDir%, Password %vPas%
echo Is this correct (Y/N)
set/p "cho=>"
if %cho%==Y goto STARTUP
if %cho%==y goto STARTUP
if %cho%==n goto END
if %cho%==N goto END
:End

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...