Introduction: Welcome Instructables!

Welcome instructables to my First instructable step-by-step guide.
Please continue to the next step to get started!

Step 1: Batch Programming!

Now!
Batch programming is one of the most simplest and basic programming you can imagine!
Many advanced programmers or even anyone that is doing Software or web Development will
probably find this post rather boring!
But i believe that Batch programming is one of the fundamental ways of setting anyone who is
a non-programmer into a path of technology!
On the next step i will begin with the basics!

Step 2: Simple Form of Batch Lines

Now Batch files are lines of commands that you write in notepad.exe and save as a .bat extension (.bat) meaning (.batch)
the First thing you'll need to learn is how to use the "echo" function!

The "Echo" function is best used if you dont want your commands to be displayed and wish to display a message!
for instance;

@echo off   (this will make my commands invisible but errors and invalid commands and echo-messages still appear)
@echo on (this will show your current path and the commands you type as well as everything else.
Try this, open up notepad.exe and copy and paste the following;

@echo off
echo Hello!
echo --------
echo.
echo This is my First batch file!
echo.
echo Maybe one day i'll become a Games or Web Programmer!
pause
exit

Now save the above paragraph as myfirst.bat  then run it 
Please proceed to the next step to learn more.

Step 3:

okay, Now i'll explain what was what in the last step.

------------------------------------------------
@echo off = turning command echoing off, Looks smoother and cleaner, always best to leave off.
echo Hello! = a "echo" message
echo --------- = this is just a hyphen, makes things look pretty 
echo. = Adding a dot without a space onto "echo" makes it a clear line.
echo This is my First batch file! = =An "echo" Message.
echo. = Adding a dot without a space onto "echo" makes it a clear line.
echo Maybe one day i'll become a Games or Web Programmer! = This is another "echo" message.
pause = This pauses the current batch file until you press any key.
exit = This command exits the current batch file instantly, Note that there are various methods to exit.
----------------------------------------------------

Step 4: More Advanced!

Heres something you want to copy and paste into a notepad.exe and save a Advanced.bat

@echo off
:start
cls
echo Welcome to This current Batch Process!
echo ===============================
echo.
set /p option=Please type continue and hit enter if you want to proceed:
if %option%==continue goto 1
goto invalid
:invalid
cls
echo Invalid command, please try again in a moment...
ping localhost -n 3 >nul
goto start
:1
cls
echo Welcome to the Advanced Panel...
echo ===========================
ping localhost -n 2 >nul
pause
cls
echo Here i will give you two options!
echo ========================
pause
cls
echo if you get the right option you will complete this and stop wasting your time!
echo ==========================================================
pause
cls
echo But if you're wrong.....
ping localhost -n 3 >nul
cls
echo then you're in for a big surprise!
pause
:batchstart
cls
echo here are your options!
echo ==========================
echo is echo command turned on or off?
echo ==========================
echo.
echo [1] Yes! i see no commands!
echo [2] No! you are just displaying messages!
echo ---------------------------------------------------------
set /p batch=1 or 2? 
if %batch%==1 goto right
if %batch%==2 goto wrong
goto wrongbatch
:wrongbatch
cls
echo ==================
echo only type 1 or 2 please!
echo ==================
pause
goto batchstart
:right
cls
echo you are CORRECT!!
echo Now go and make some batch programs and Practice your software.
echo You've got a long path to go!
echo ====================================================
pause
exit
:wrong
cls
echo ===================
echo im sorry but here it goes!
echo ===================
echo.
echo please prepare your eyes! ....
echo Really...
ping localhost -n 4 >nul
cls
:colorstart
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
color 1a
color 2b
color 3c
color 4d
color 5e
color 6c
color 7e
color 0f
goto colorstart

Step 5: Little Cleaner Software!

Heres a little cleanup software i made
You might want to use it every now and then, it actually helps :)
copy and paste the following into notepade.exe and save as cleanup.bat

echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading..
echo [[*] ]10%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading...
echo [[*][*][*] ]20%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading....
echo [[*][*][*][*][*] ]30%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading.....
echo [[*][*][*][*][*][*][*] ]40%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading......
echo [[*][*][*][*][*][*][*][*][*] ]50%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading.......
echo [[*][*][*][*][*][*][*][*][*][*][*] ]60%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading........
echo [[*][*][*][*][*][*][*][*][*][*][*][*][*] ]70%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading.........
echo [[*][*][*][*][*][*][*][*][*][*][*][*][*][*][*] ]80%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading..........
echo [[*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*]]90%
ping localhost -n 2 >nul
cls
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo Loading Successfull !
echo [[*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*]]100%
ping localhost -n 2 >nul
cls
color 0a
echo                .-.   .-.      .-.                            
echo                 : :.-.: :      : :                            
echo                 : :: :: : .--. : :   .--.  .--. ,-.,-.,-. .--.
echo                 : `' `' ;' '_.': :_ '  ..'' .; :: ,. ,. :' '_.'
echo                  `.,`.,' `.__.'`.__;`.__.'`.__.':_;:_;:_;`.__.'                                                
echo                                  .-----.   
echo                                  `-. .-'   
echo                                    : : .--.
echo                                    : :' :; :
echo                                    :_;`.__.'
echo                                 .--.    .-..-.
echo                                : .--'   : :; :
echo                                : :      :    :
echo                                : :__  _ : :: :
echo                                `.__.':_;:_;:_;                               
echo        .---.                   .-.                                    .-.
echo        : .  :                  : :                                   .' `.
echo        : :: : .--. .-..-. .--. : :   .--. .---. ,-.,-.,-. .--. ,-.,-.`. .'
echo        : :; :' '_.': `; :' '_.': :_ ' .; :: .; `: ,. ,. :' '_.': ,. : : :
echo        :___.'`.__.'`.__.'`.__.'`.__;`.__.': ._.':_;:_;:_;`.__.':_;:_; :_; (c)
echo                                           : :                            
echo                                           :_;                            
pause
cls
:menu
cls
color 04
echo.                                                                                             
echo ==============================
echo Let's see what we can do here.
echo ==============================
echo.
echo Select an option
echo -----------------------------------------------------
echo.
echo [1] Eat Internet Cookies
echo [2] Bin Temporary Internet Files
echo [3] Hoover and do the Disk Cleanup
echo [4] Wash the windows and perform the Disk Defragment
echo [5] Fire the cleaner
echo.
echo -----------------------------------------------------
echo.
set /p op=Option:
if %op%==1 goto 1
if %op%==2 goto 2
if %op%==3 goto 3
if %op%==4 goto 4
if %op%==5 goto exit
goto error
:1
cls
echo --------------------------------------------------------------------------------
echo Delete Internet Cookies
echo --------------------------------------------------------------------------------
echo.
echo Eating Cookies...
ping localhost -n 3 >nul
del /f /q "%userprofile%\Cookies\*.*"
cls
echo --------------------------------------------------------------------------------
echo Delete Internet Cookies
echo --------------------------------------------------------------------------------
echo.
echo Cookies ate...give me more.
echo.
echo Press any key to return to the menu. . .
pause >nul
goto menu
:2
cls
echo --------------------------------------------------------------------------------
echo Delete Temporary Internet Files
echo --------------------------------------------------------------------------------
echo.
echo throwing the Temporary Files in the bin...
ping localhost -n 3 >nul
del /f /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*"
cls
echo --------------------------------------------------------------------------------
echo Delete Temporary Internet Files
echo --------------------------------------------------------------------------------
echo.
echo Temporary Internet Files Bagged and binned.
echo.
echo Press any key to return to the menu. . .
pause >nul
goto menu
:3
cls
echo --------------------------------------------------------------------------------
echo Disk Cleanup
echo --------------------------------------------------------------------------------
echo.
echo Running Disk Cleanup and getting the hoover ready...
ping localhost -n 3 >nul
if exist "C:\WINDOWS\temp"del /f /q "C:WINDOWS\temp\*.*"
if exist "C:\WINDOWS\tmp" del /f /q "C:\WINDOWS\tmp\*.*"
if exist "C:\tmp" del /f /q "C:\tmp\*.*"
if exist "C:\temp" del /f /q "C:\temp\*.*"
if exist "%temp%" del /f /q "%temp%\*.*"
if exist "%tmp%" del /f /q "%tmp%\*.*"
if not exist "C:\WINDOWS\Users\*.*" goto skip
if exist "C:\WINDOWS\Users\*.zip" del "C:\WINDOWS\Users\*.zip" /f /q
if exist "C:\WINDOWS\Users\*.exe" del "C:\WINDOWS\Users\*.exe" /f /q
if exist "C:\WINDOWS\Users\*.gif" del "C:\WINDOWS\Users\*.gif" /f /q
if exist "C:\WINDOWS\Users\*.jpg" del "C:\WINDOWS\Users\*.jpg" /f /q
if exist "C:\WINDOWS\Users\*.png" del "C:\WINDOWS\Users\*.png" /f /q
if exist "C:\WINDOWS\Users\*.bmp" del "C:\WINDOWS\Users\*.bmp" /f /q
if exist "C:\WINDOWS\Users\*.avi" del "C:\WINDOWS\Users\*.avi" /f /q
if exist "C:\WINDOWS\Users\*.mpg" del "C:\WINDOWS\Users\*.mpg" /f /q
if exist "C:\WINDOWS\Users\*.mpeg" del "C:\WINDOWS\Users\*.mpeg" /f /q
if exist "C:\WINDOWS\Users\*.ra" del "C:\WINDOWS\Users\*.ra" /f /q
if exist "C:\WINDOWS\Users\*.ram" del "C:\WINDOWS\Users\*.ram"/f /q
if exist "C:\WINDOWS\Users\*.mp3" del "C:\WINDOWS\Users\*.mp3" /f /q
if exist "C:\WINDOWS\Users\*.mov" del "C:\WINDOWS\Users\*.mov" /f /q
if exist "C:\WINDOWS\Users\*.qt" del "C:\WINDOWS\Users\*.qt" /f /q
if exist "C:\WINDOWS\Users\*.asf" del "C:\WINDOWS\Users\*.asf" /f /q
:skip
if not exist C:\WINDOWS\Users\Users\*.* goto skippy /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.zip del C:\WINDOWS\Users\Users\*.zip /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.exe del C:\WINDOWS\Users\Users\*.exe /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.gif del C:\WINDOWS\Users\Users\*.gif /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.jpg del C:\WINDOWS\Users\Users\*.jpg /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.png del C:\WINDOWS\Users\Users\*.png /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.bmp del C:\WINDOWS\Users\Users\*.bmp /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.avi del C:\WINDOWS\Users\Users\*.avi /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.mpg del C:\WINDOWS\Users\Users\*.mpg /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.mpeg del C:\WINDOWS\Users\Users\*.mpeg /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.ra del C:\WINDOWS\Users\Users\*.ra /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.ram del C:\WINDOWS\Users\Users\*.ram /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.mp3 del C:\WINDOWS\Users\Users\*.mp3 /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.asf del C:\WINDOWS\Users\Users\*.asf /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.qt del C:\WINDOWS\Users\Users\*.qt /f /q
if exist C:\WINDOWS\Users\AppData\Temp\*.mov del C:\WINDOWS\Users\Users\*.mov /f /q
:skippy
if exist "C:\WINDOWS\ff*.tmp" del C:\WINDOWS\ff*.tmp /f /q
if exist C:\WINDOWS\ShellIconCache del /f /q "C:\WINDOWS\ShellI~1\*.*"
cls
echo --------------------------------------------------------------------------------
echo Disk Cleanup
echo --------------------------------------------------------------------------------
echo.
echo Disk Cleanup and the hoovering are successful!
echo.
pause
goto menu
:4
cls
echo --------------------------------------------------------------------------------
echo Disk Defragment
echo --------------------------------------------------------------------------------
echo.
echo Defragmenting hard disks and washing the windows...
ping localhost -n 3 >nul
defrag -c -v
cls
echo --------------------------------------------------------------------------------
echo Disk Defragment
echo --------------------------------------------------------------------------------
echo.
echo Disk Cleaned and windows Washed.
echo.
pause
goto menu
:error
cls
echo Command not recognized.
ping localhost -n 4 >nul
goto menu
:exit

@echo off
echo Thanks for using Callums PC cleanup tool(c)
ping localhost -n 2 >nul
cls
echo.                                               
echo.                                               
echo                                 .--.    .-..-.
echo                                : .--'   : :; :
echo                                : :      :    :
echo                                : :__  _ : :: :
echo                                `.__.':_;:_;:_;
echo.                               
echo        .---.                   .-.                                    .-.
echo        : .  :                  : :                                   .' `.
echo        : :: : .--. .-..-. .--. : :   .--. .---. ,-.,-.,-. .--. ,-.,-.`. .'
echo        : :; :' '_.': `; :' '_.': :_ ' .; :: .; `: ,. ,. :' '_.': ,. : : :
echo        :___.'`.__.'`.__.'`.__.'`.__;`.__.': ._.':_;:_;:_;`.__.':_;:_; :_; (c)
echo                                           : :                            
echo                                           :_;                            
echo.                                                   
echo.
echo.
ping localhost -n 4 >nul
exit

Step 6: Easy Way to Learn It All

The previous batch file i displayed is a VERY old version, i personally made a 15 option password protected with games included batch process for my own use.

How i learnt in one week how to make it in two days is just by copy pasting and messing around with things!
literally just go into notepad and do your best, note it always helps to keep a log(seperate notepad or txt file) to keep track
of what changes you make so if anything suddenly stops working you can go into your log and check what changes you made a maybe see if you miss typed or miss placed any commands.

Step 7: Thank You

Thanks for reading and/or testing out the commands
I really hope you learned something or i helped you in any way!
please feel free to comment what ever suggestion/idea or topic you have in mind.

once again thank you!
 oh and PS: here are screenshots of my current batch file.

Step 8: Horse

The horse from my Admin panel - For pure fun only.

Step 9: The "log"

Starting from Version 1.6 all the way to version 3.4 - Every update made the bath file more stable and faster.
this log file is only reachable through the admin panel.

Step 10: Admin Password Page.

This part is where you must type in the password given to you by the admin personally or by someone that knows the password,
only with the password can you get in to the admin panel, the password cannot be found in the batch file itself, its a calculation of math hidden in the HUGE amount of codes and lines written in the software.
Without the password there is no way of getting into or onto the admin panel.

Step 11: Goodnight and Goodbye!

Made in about 30 seconds!
Thats what you can do !
and by the way if you are looking to make virus's or deadly scripts out of batch its best if you download Virtual box to run it on a virtual window and disk.
Thanks for the last time and i leave you with my last Screenshot!
This has been my First Guide so please dont be too harsh on me :)

Comments

author
russ_hensel (author)2014-02-22

If you like batch programming take a look at Pylthon.

author

I certainly will! :)

author
CallumBatchDevelopment (author)2014-02-22

Just to add!

It's Hotmail.com

not .co.uk

I make these mistakes all the time -______-

About This Instructable

2,438views

53favorites

More by CallumBatchDevelopment:How to Create A simple Batch password.Welcome Instructables!
Add instructable to: