photoshopexp3rt
Forum Addict
Hello everyone, Jordan here! Today, I will be showing you how to create a standard .bat file, and use it to your advantage.
First off, open a new notepad file, and type "@echo off"
Secondly, you can type a message, make it look as such:
Next, what you'll do is save this as test.bat, and then go to the destination you saved it to, open it up, and you should get this:
I would go into explaining Echo off/on, but it's not important, really. All you need to know is:
Echo off: No directories will be shown. (Only what you put in.)
Echo on: Directories will be shown. (Example: C:\Windows\Users\Test.bat Hey!)
Now, try this!
Type in this line of text:
What this does is, makes it where, when you press the key to continue, the second line will show up...such as in the following picture.
Now that you've mastered the basics, let's try some intermediate-type CMDs.
Open up your test file (test.bat), and type in the following information:
This is the result you should get
Now, for this next part, go ahead and create a new folder on your desktop, and name it TestFolder1. Inside this folder, place a picture. Rename the picture to Testpic1, then come back to this guide!
Alright, got it all set up? Awesome. Now, open your test.bat with notepad (Right Click -> Open with -> Notepad)
Erase everything inside, and replace it with:
Note: You can replace "start XXXXXX" with any file you wish, just be sure to type it *exactly* as it is saved!
Here is the output of the project above:
Alright, guys, had enough of the easy peasy stuff? Let's get advanced.
First off, open your Test.bat in a notepad file, and completely clear everything, and start fresh.
Now, type the following information into your document:
Now that that's all typed up, give it a shot, and save your .bat file, and then go open it up! This *should* be the output! 
Awesome! Now, let's move on to using "Calls". What a call does, is import a .bat file into your current .bat file, now, to do this, simply type the following information in! (After clearing your slate from the previous example.)
Now, save your file!
now STOP HERE!
Before opening this batch file, create a new batch file, by going the following:
1. Open notepad.
2. input the following information:
The result should look similar to this:
Amazing job so far! Let's see...how can we make it even more advanced...Let's make a digital clock!
As always, before we continue, open your default test.bat, and clear everything inside.
Now, type the following information (you may wanna just copy/paste):
The result should be as follows:
Oh dear, did I skip ahead way too fast?
Well, join me next time in my EXTREME guide to .bat files, and I'll go into depth of how the clock was created!
For now guys, this has been Photoshopexp3rt/Jordan.
Thanks for viewing. If this has helped you at all, please, reply with a comment or some cool stuff you've come up with.
BONUS:
For reading my entire guide, you will now get to f**k around a little with a .bat command
Enjoy this 
1. Open a new notepad.
2. Input the following information:
3. Save as Whatever.bat
4. Open it and watch
.
First off, open a new notepad file, and type "@echo off"
Secondly, you can type a message, make it look as such:
Next, what you'll do is save this as test.bat, and then go to the destination you saved it to, open it up, and you should get this:
I would go into explaining Echo off/on, but it's not important, really. All you need to know is:
Echo off: No directories will be shown. (Only what you put in.)
Echo on: Directories will be shown. (Example: C:\Windows\Users\Test.bat Hey!)
Now, try this!
Type in this line of text:
What this does is, makes it where, when you press the key to continue, the second line will show up...such as in the following picture.
Now that you've mastered the basics, let's try some intermediate-type CMDs.
Open up your test file (test.bat), and type in the following information:
This is the result you should get
Now, for this next part, go ahead and create a new folder on your desktop, and name it TestFolder1. Inside this folder, place a picture. Rename the picture to Testpic1, then come back to this guide!
Alright, got it all set up? Awesome. Now, open your test.bat with notepad (Right Click -> Open with -> Notepad)
Erase everything inside, and replace it with:
Code:
@echo off
echo We are testing "start" and "remark"
rem title Testfolder1
start testpic1.png (you can replace this with whatever extension your pic is.)
pause
Here is the output of the project above:
Alright, guys, had enough of the easy peasy stuff? Let's get advanced.
First off, open your Test.bat in a notepad file, and completely clear everything, and start fresh.
Now, type the following information into your document:
Code:
@echo off
echo Testing for Photoshopexp3rt's guide on Sythe!
echo If you want to do math type 1 and press enter
echo If you want to see a picture type 2 and press enter
set /p option=
if '%option%'=='1' goto :math
if '%option%'=='2' start testpic1.png(or any extension)
:math
echo 79x19.2=?
pause
Awesome! Now, let's move on to using "Calls". What a call does, is import a .bat file into your current .bat file, now, to do this, simply type the following information in! (After clearing your slate from the previous example.)
Code:
@echo off
echo W00t, I know the basics of BATCH! Thanks photoshopexp3rt!
pause
cls
call call.bat
now STOP HERE!
Before opening this batch file, create a new batch file, by going the following:
1. Open notepad.
2. input the following information:
Code:
@echo off
echo Hey! Look, I'm using Calls!
pause
The result should look similar to this:
Amazing job so far! Let's see...how can we make it even more advanced...Let's make a digital clock!
As always, before we continue, open your default test.bat, and clear everything inside.
Now, type the following information (you may wanna just copy/paste):
Code:
@echo off
color 09
setlocal enabledelayedexpansion
set s1=ÛßÛ ÜÛ -ßßÛ ßßÛ Û Û Ûßß Ûßß ßßÛ ÛßÛ ÛßÛ
set s2=Û Û- Û -Ûßß ßßÛ ßßÛ ßßÛ ÛßÛ-- Û ÛßÛ ßßÛ
set s3=ßßß ßßß ßßß ßßß-- ß ßßß ßßß-- ß ßßß ßßß
::-----012345678901234567890123456789012345678
:loop
cls
echo.
for /f "tokens=1" %%u in ('echo %time%') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set tim=%t:~0,2%%t:~3,2%%t:~6,2%
set t1=!tim:~0,1!
set t2=!tim:~1,1!
set t3=!tim:~2,1!
set t4=!tim:~3,1!
set t5=!tim:~4,1!
set t6=!tim:~5,1!
:line1
set /a pos=4*!t1!
set x1=!s1:~%pos%,3!
set /a pos=4*!t2!
set x2=!s1:~%pos%,3!
set /a pos=4*!t3!
set x3=!s1:~%pos%,3!
set /a pos=4*!t4!
set x4=!s1:~%pos%,3!
set /a pos=4*!t5!
set x5=!s1:~%pos%,3!
set /a pos=4*!t6!
set x6=!s1:~%pos%,3!
echo %x1% %x2% Ü %x3% %x4% Ü %x5% %x6%
::line2
set /a pos=4*!t1!
set x1=!s2:~%pos%,3!
set /a pos=4*!t2!
set x2=!s2:~%pos%,3!
set /a pos=4*!t3!
set x3=!s2:~%pos%,3!
set /a pos=4*!t4!
set x4=!s2:~%pos%,3!
set /a pos=4*!t5!
set x5=!s2:~%pos%,3!
set /a pos=4*!t6!
set x6=!s2:~%pos%,3!
echo %x1% %x2% - %x3% %x4% - %x5% %x6%
:line3
set /a pos=4*!t1!
set x1=!s3:~%pos%,3!
set /a pos=4*!t2!
set x2=!s3:~%pos%,3!
set /a pos=4*!t3!
set x3=!s3:~%pos%,3!
set /a pos=4*!t4!
set x4=!s3:~%pos%,3!
set /a pos=4*!t5!
set x5=!s3:~%pos%,3!
set /a pos=4*!t6!
set x6=!s3:~%pos%,3!
echo %x1% %x2% ß %x3% %x4% ß %x5% %x6%
:wait
for /f "tokens=1" %%u in ('echo %time%') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set tim2=%t:~0,2%%t:~3,2%%t:~6,2%
if %tim2%==%tim% goto :wait
goto :loop
The result should be as follows:
Oh dear, did I skip ahead way too fast?
Well, join me next time in my EXTREME guide to .bat files, and I'll go into depth of how the clock was created!
For now guys, this has been Photoshopexp3rt/Jordan.
Thanks for viewing. If this has helped you at all, please, reply with a comment or some cool stuff you've come up with.
BONUS:
For reading my entire guide, you will now get to f**k around a little with a .bat command
1. Open a new notepad.
2. Input the following information:
Code:
@echo off
:A
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 1f
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 7b
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 3a
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 7c
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 8c
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
color 3f
echo /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
goto :A
4. Open it and watch


