loading
I know, I know. You can make anything into an address book, why should you make a batch file into one. Well, the simple answer is: Leave now, this isn't the instructable for you. The other answer is: I had the idea when I was getting my hair cut, its been nagging me ever since and I decided to make it a reality. I had minimal trouble with it, a few rough edges that needed sanding, but other than that, pretty straight forward.

Now, onto the programme's abilities. In this file you can:
1.Add a contact with several peices of information including (but not limited to): Home number, mobile, address, other address (optional), first and last names, birthdays and email addresses. You can add as many contacts as your computer's memory will allow (which is better than the normal contact books).
2.View a contacts details
3.Delete a contact's details.

Now, onto the code.

Step 1: Code

Enter the following code into notepad and name it "Address Book.bat".

REM INITIAL SETTINGS
@ECHO OFF                             
TITLE LOGIN                           
COLOR 0e                              
CD INFO                               
CLS                                   

REM CHECK FOR A USER
IF NOT EXIST USER.TXT GOTO CREATE_USER
GOTO LOGIN                            

REM CREATING A USER
:CREATE_USER
TITLE WELCOME                         
CLS
ECHO THIS APPEARS TO BE YOUR FIRST TIME USING THIS PROGRAMME 
ECHO.                                 
ECHO WE NEED YOU TO MAKE YOUR PROFILE
ECHO.
ECHO PLEASE KEEP IN MIND THAT YOUR PERSONAL DATA WILL ONLY BE ACCESIBLE VIA YOUR COMPUTER
ECHO.
SET /P USER=TYPE YOUR PREFFERED USERNAME HERE:        
SET /P NAME=TYPE YOUR REAL NAME HERE:
ECHO.
SET /P PASS=TYPE YOUR PREFFERED PASSWORD HERE:
SET /P PASS2=RETYPE YOUR PASSWORD HERE:
REM MAKING SURE THE TWO PASSWORDS ARE THE SAME
IF %PASS% NEQ %PASS2% GOTO DIFF       
GOTO CONFIRM     

REM SCENARIO WHEN YOU ENTER TWO DIFFERENT PASSWORDS
:DIFF
CLS
ECHO THE PASSWORDS YOU HAVE ENTERED DO NOT MATCH
ECHO.
ECHO PRESS ANY KEY TO GO BACK TO THE USER CREATION SCREEN
PAUSE >NUL                           
GOTO CREATE_USER

REM CONFIRMING YOUR DATA
:CONFIRM
CLS
ECHO PLEASE CONFIRM YOUR USER SETTINGS
ECHO USERNAME=%USER%                
ECHO NAME=%NAME%
ECHO PASSWORD=%PASS%
ECHO.
ECHO.
ECHO DO YOU WANT TO KEEP THESE SETTINGS? (Y/N)
CHOICE /C YN /N                     
IF %ERRORLEVEL% EQU 1 GOTO CREATE_FILES 
GOTO CREATE_USER

REM CREATING THE FILES TO SUSTAIN THE PROGRAMME
:CREATE_FILES
IF EXIST INFO RMDIR INFO            
MD INFO                             
CD INFO
ECHO :: > "USER.TXT"                
ECHO This text document is to verify that you have a user profile, if you delete it you will lose all of your data. >> "USER.TXT"
ECHO :: > "DATA.BAT"
ECHO SET PASSWORD=%PASS% >> "DATA.BAT" 
ECHO SET NAME=%NAME% >> "DATA.BAT"
ECHO SET USER=%USER% >> "DATA.BAT"
ATTRIB +R USER.TXT                    
GOTO WELCOME

REM LOGIN
:LOGIN
CD INFO
CALL DATA.BAT                         
CLS
ECHO PLEASE ENTER YOUR USERNAME
SET /P USERNAME=
IF %USERNAME% NEQ %USER% GOTO DIF
CLS
ECHO PLEASE ENTER YOUR PASSWORD
SET /P PASS=
IF %PASS% NEQ %PASSWORD% GOTO DIF
GOTO WELCOME

REM THE SCENARIO WHEN YOUR USERNAME/PASSWORD IS INCORRECT
:DIF
CLS
ECHO IT SEEMS YOUR PASSWORD OR USERNAME WAS INCORRECT
ECHO.
ECHO PRESS ANY KEY TO TRY AGAIN
PAUSE >NUL
GOTO LOGIN

REM WELCOMING TO THE PROGRAMME
:WELCOME
CLS
ECHO WELCOME %NAME%
ECHO.
ECHO LOADING YOUR PERSONAL SETTINGS[ 10%
PING LOCALHOST -n 2 >NUL                   
CLS
ECHO WELCOME %NAME%
ECHO.
ECHO LOADING YOUR PERSONAL SETTINGS[][ 30%
PING LOCALHOST -n 2 >NUL
CLS
ECHO WELCOME %NAME%
ECHO.
ECHO LOADING YOUR PERSONAL SETTINGS[][][ 50%
PING LOCALHOST -n 2 >NUL
CLS
ECHO WELCOME %NAME%
ECHO.
ECHO LOADING YOUR PERSONAL SETTINGS[][][][ 70%
PING LOCALHOST -n 2 >NUL
CLS
ECHO WELCOME %NAME%
ECHO.
ECHO LOADING YOUR PERSONAL SETTINGS[][][][] 80%
PING LOCALHOST -n 2 >NUL
CLS
ECHO LOADING YOUR PERSONAL SETTINGS[][][][][] 100%
PING LOCALHOST -n 3 >NUL
CLS
ECHO DONE!
PING LOCALHOST -n 3 >NUL
GOTO MAIN


REM WHERE THE MAGIC HAPPENS
:MAIN
TITLE ADDRESS BOOK V 1
CLS
ECHO WHAT WOULD YOU LIKE TO DO?
ECHO.
ECHO 1) ADD A CONTACT
ECHO 2) DELETE A CONTACT
ECHO 3) SEARCH FOR A CONTACT
SET /P MENU=
IF %MENU% EQU 1 GOTO ADD
IF %MENU% EQU 2 GOTO DEL
IF %MENU% EQU 3 GOTO VIEW
GOTO ERROR

REM WHERE YOU ADD A CONTACT
:ADD
SET OTHERA=0
SET SK1=0
SET SK2=0
SET SK3=0
SET SK4=0
SET SK5=0
SET SK6=0
SET SK7=0
SET SK8=0
SET SK9=0
CLS
ECHO DO NOT USE SPACES! USE UNDERSCORES (_) INSTEAD!
ECHO YOU HAVE CHOSEN TO ADD A CONTACT
ECHO.
ECHO TYPE SKIP IF YOU DON'T WANT A CERTAIN ASPECT TO BE RECORDED. ITEMS MARKED WITH A
ECHO * ARE COMPULSORY
SET /P FNAME=FIRST NAME*:
IF %FNAME% EQU SKIP SET SK1=1
SET /P LNAME=LAST NAME*:
IF %LNAME% EQU SKIP SET SK2=1
SET /P HNUM=HOME NUMBER:
IF %HNUM% EQU SKIP SET SK3=1
SET /P MNUM=MOBILE NUMBER:
IF %MNUM% EQU SKIP SET SK4=1
SET /P HOME=HOME ADDRESS:
IF %HOME% EQU SKIP SET SK5=1
SET /P OTHERA=OTHER ADDRESS:
IF %OTHERA% EQU SKIP SET SK6=1
IF %OTHERA% NEQ 0 SET /P SPECA=PLEASE SPECIFY*: (USE UNDERSCORES (_) FOR SPACES)
IF %SPECA% EQU SKIP SET SK7=1
SET /P EMAIL=EMAIL:
IF %EMAIL% EQU SKIP SET SK8=1
SET /P BDAY=BIRTHDAY:
IF %BDAY% EQU SKIP SET SK9=1
GOTO ADD2

REM CONTACT'S FILE IS BEING CREATED
:ADD2
CD INFO
CLS
ECHO :: > "%LNAME%, %FNAME%.BAT"
ECHO SET FNAME=%FNAME% >> "%LNAME%, %FNAME%.BAT"
ECHO SET LNAME=%LNAME% >> "%LNAME%, %FNAME%.BAT"
IF %SK3% EQU 0 ECHO SET HNUM=%HNUM% >> "%LNAME%, %FNAME%.BAT"
IF %SK4% EQU 0 ECHO SET MNUM=%MNUM% >> "%LNAME%, %FNAME%.BAT"
IF %SK5% EQU 0 ECHO SET HOME=%HOME% >> "%LNAME%, %FNAME%.BAT"
IF %SK6% EQU 0 ECHO SET OTHERA=%OTHERA% >> "%LNAME%, %FNAME%.BAT"
IF %SK7% EQU 0 ECHO SET SPECA=%SPECA% >> "%LNAME%, %FNAME%.BAT"
IF %SK8% EQU 0 SET EMAIL=%EMAIL% >> "%LNAME%, %FNAME%.BAT"
IF %SK9% EQU 0 SET BDAY=%BDAY% >> "%LNAME%, %FNAME%.BAT"
GOTO SUC1

REM LAST CHECK
:SUC1
CLS
ECHO PLEASE CHECK OVER THE DETAILS
CALL %LNAME%, %FNAME%.BAT
ECHO.
ECHO.
ECHO FIRST NAME:%FNAME%
ECHO LAST NAME:%LNAME%
IF %SK3% EQU 0 ECHO HOME NUMBER:%HNUM%
IF %SK4% EQU 0 ECHO MOBILE NUMBER:%MNUM%
IF %SK5% EQU 0 ECHO HOME ADDRESS:%HOME%
IF %SK6% EQU 0 ECHO OTHER ADDRESS:%OTHERA% (%SPECA%)
IF %SK8% EQU 0 ECHO EMAIL ADDRESS:%EMAIL%
IF %SK9% EQU 0 ECHO BIRTHDAY:%BDAY%
ECHO.
ECHO.
ECHO PRESS ANY KEY TO RETURN TO MAIN
PAUSE >NUL
GOTO MAIN

REM SEARCH FOR A CONTACT TO DELETE
:DEL
CD INFO
CLS
ECHO YOU HAVE CHOSEN TO DELETE A CONTACT
ECHO PRESS E TO EXIT (REMEMBER CAPITALS)
ECHO.
ECHO.
SET /P FIRST=FIRST NAME:
SET /P LAST=LAST NAME:
IF EXIST "%LAST%, %FIRST%.BAT" GOTO DEL
CLS
ECHO NO CONTACT OF THAT NAME WAS FOUND, CHECK YOUR SPELLING.
ECHO PRESS ANY KEY TO GO BACK
PAUSE >NUL
GOTO DEL

REM WHERE YOU DELETE THE CONTACT
CLS
ECHO ARE YOU SURE YOU WANT TO DELETE %FIRST% %LAST%'S CONTACT? (Y/N)
CHOICE /C YN /N
IF %ERRORLEVEL% EQU 1 DEL "%LAST%, %FIRST%.BAT"
ECHO PRESS ANY KEY TO RETURN
PAUSE >NUL
GOTO DEL

REM WHERE YOU VIEW A CONTACT'S DETAILS
:VIEW
SET LNAME=
SET FNAME=
SET HNUM=
SET MNUM=
SET EMAIL=
SET HOME=
SET BDAY=
SET OTHERA=
SET SPECA=
CD INFO
CLS
ECHO YOU HAVE CHOSEN TO VIEW A CONTACT'S DETAILS
ECHO TYPE E TO GO BACK TO MAIN
ECHO.
ECHO.
SET /P FIRST=FIRST NAME:
IF %FIRST% EQU E GOTO MAIN
SET /P LAST=LAST NAME:
IF EXIST "%LAST%, %FIRST%.BAT" GOTO EXIST
CLS
ECHO NO CONTACTS WERE FOUND UNDER THAT NAME, SORRY
ECHO.
ECHO PRESS ANY KEY TO SEARCH AGAIN
PAUSE >NUL
GOTO VIEW

REM WHERE YOU GO IF THE CONTACT EXISTS
:EXIST
CALL "%LAST%, %FIRST%.BAT"
CLS
ECHO .%FNAME% %LNAME%
ECHO .%HNUM%
ECHO .%MNUM%
ECHO .%HOME%
ECHO .%OTHERA% %SPECA%
ECHO .%EMAIL%
ECHO .%BDAY%
ECHO.
ECHO PRESS ANY KEY TO RETURN
PAUSE >NUL
GOTO MAIN

:ERROR
CLS
ECHO AN ERROR HAS BEEN REPORTED
ECHO.
ECHO PRESS ANY KEY TO GO TO THE MAIN SCREEN
PAUSE >NUL
GOTO MAIN

As you may be able to see, I have tried to describe what each section does by way of the "REM" command.
Developers might find this helpful when editing the program.  

Step 2: Statisitics

The code takes up 292 lines, consisting of 7206 characters (including spaces). That's about 24.68 characters/line of code.

That's it. Have fun?

Keep in mind that only the first picture is mine, the rest I selected at random from a google image search.
Can I Jist Ask What Is Rem, I Do Alot Of Baych Coding Muself But Have Never Heard Of Rem, What Does It Do?
<p>REM stands for &quot;remark&quot;. It is the equivalent of &quot;::&quot; or any other commenting system you can come up with. It's really a command. When the interpreter sees it, it ignores the rest of the line.</p>
And 2:<br>Let a .bat file download(still searching a good site to do that-dropbox-googledrive?)<br>Let a .bar file download an other .bat file and run that one.<br>It can be done by this<br>Download lalala from www.giwnckdncoak.com<br>Start lalala, you just first download it and already have standing in the script what the name is
You should be able to download .bat files while they are inside a zipped file. All you need to do then is extract the file. To make the .bat file download another, the magic is in where you download it from. If you can find a site where the download starts automatically upon entering the page, then you can have the line: <br> <br>start www.download.com <br> <br>And the zipped file with the other batch file in it will start downloading. <br> <br>Also, if you have an extraction program installed that has command line support (like 7zip), you can extract the zipped file straight after it downloads. <br> <br>7z x &quot;Path\To\File.bat&quot; <br> <br>
THANKS MAN! <br>i am trying it atm
thank you very much, i am trying it now
You said you always wanted to help other people with scripting, i currently need help with 2 things:<br>1<br>Let a .bat file send an auto-genarated email, not for spam but so i can edit a .bat while not have acces to that computer
This site might have what you need: <br> <br>http://www.robvanderwoude.com/amb_email.php
This is just one of many new instructables that I am working on. All the original functions withing my Mega_Menu V 2.4 will be made into an instructable. I will be uploading a &quot;Text to Speech&quot; program soon.

About This Instructable

2,287views

1favorite

License:

Bio: I enjoy anything to do with computers. I have made some interesting scripts, and I am constantly improving my skill set. One day I hope ... More »
More by Prof. Pickle:How to Create your own Commands with Batch Start a batch file completely hidden Tips on how to find errors in code (focused on DOS) 
Add instructable to: