Monday, November 5, 2012

The 3 use batch file.

I Have been programming a Batch file and with help from www.tweakandtrick.com I have finished it. A good batch file that is not to hard to run. Here is the script:


cls
@echo off
title Welcome
color 0a
:idiot
echo Welcome %username% to you Windows Computer
echo What would you like to do?
echo ________________________________________________________
echo a) Create/Lock a folder
echo b) Shutdown %username%`s computer
echo c) Close
set/p "cho=>"
if %cho%==a goto fart
if %cho%==A goto fart
if %cho%==b goto shut
if %cho%==B goto shut
if %cho%==c goto me
if %cho%==C goto me
echo Invalid Option
:fart
cls 
@ECHO OFF
color 0a
title Folder
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST MyFolder goto MDMyFolder 
:CONFIRM 
echo Are you sure to lock this 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 MyFolder "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 Your Secure Folder 
set/p "pass=>" 
if NOT %pass%== Password FAIL 
attrib -h -s "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" 
ren "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" MyFolder 
echo Folder Unlocked successfully 
goto End 
:FAIL 
echo Invalid password 
goto end 
:MDMyFolder
md MyFolder
echo MyFolder created successfully 
goto End 
:End
:me 
cls
@Exit
:shut
shutdown.exe /s /c "Thank You For, using this command file by Eli" /t 30


Copy this down into your notepad/word editor, and save as a *.bat/*.cmd
The word Password  is your password, change it to what you want.

For extra security for your folder, delete the batch file.



No comments:

Post a Comment