Jump to content

PLEASE help me with batch programming


Guest026

Recommended Posts

I was trying to learn how to make batch files with a tutorial but when I tryed one of the examples it wouldn't work. The screen just flashed black really fast so I couldn't read the thing on it.

This is exactly what I typed:

@echo off

 

:start

echo hello

goto next

 

:next

echo this text is in the ‘next’ secton

goto end

 

:end

echo and this code is in the ‘end’ section

 

Can someone PLEASE tell me what's wrong with it?

Link to comment
Share on other sites

If it's flashing back text and you can't read it, you need to open the Command Prompt (All Programs->Accessories), navigate to your program, and run it that way.

 

So do i use that "cd" command to do it?

 

(I still need help figuring out how to make an administrative account from the command prompt by the way)

Link to comment
Share on other sites

@echo off

 

:start

echo hello

goto next

 

:next

echo this text is in the ‘next’ secton

goto end

 

:end

echo and this code is in the ‘end’ section

 

:: this bit makes the script wait for a keystroke before continuing, thus holding the screen open for you

echo press any key to exit

pause

 

iirc (aaaaaaaaaaaaages since i did anything in .bat), the above will work aswell.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.