Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Posted 18 August 2012 - 12:43 AM
Edited by Blade, 18 August 2012 - 12:45 PM.
Moved to Programming
Posted 11 September 2012 - 08:27 PM
Posted 11 September 2012 - 08:34 PM
Posted 12 September 2012 - 09:42 AM
title my first batch echo hello world @echo off sleep 5 color c0 echo goodbye world @echo off sleep 5
If I have been helping you and haven't replied in 2 days, feel free to shoot me a PM!
If I have helped you and you would like to donate, please click here
Please don't send help request via PM, unless I am already helping you. Use the forums!
Posted 12 September 2012 - 09:13 PM
Posted 13 September 2012 - 01:18 AM
Posted 23 September 2012 - 11:42 PM
Where it says "hello world" change it
eg.
echo hello world
@echo off
sleep 5
echo goodbye world
@echo off
sleep 5
that will display hello world then wait and then say good by world
Hi,
you can alter the size of your window with the command mode con cols=number lines=number, where number needs to be replaced with a number to define the size. You can use the command color to change the color of your command line. COLOR c0 will create black writings on a red background. The command title, will alter the title-bar of your batch.title my first batch echo hello world @echo off sleep 5 color c0 echo goodbye world @echo off sleep 5
this batch will change the title to say "my first batch" and change the color between saying hello world and goodbye world.
regards myrti
Generally @ echo off is at the top of page. So it affects ALL commands under it. It won't ruin your code because I wrote a similar script myself
Edited by AceInfinity, 23 September 2012 - 11:46 PM.

Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer
Posted 25 September 2012 - 05:02 PM
@echo off
:top
set /p var=Type 'a', 'b' or 'c':
if "%var%"=="a" (
echo Hello World
)
if "%var%"=="b" (
echo Too good for Hello World?
)
if "%var%"=="c" (
echo Oh well Good Bye!
goto :end
)
pause
goto :top
:end
Posted 25 September 2012 - 11:25 PM

Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer
0 members, 0 guests, 0 anonymous users