Guest026 Posted November 16, 2007 Posted November 16, 2007 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?
Cap'n Refsmmat Posted November 16, 2007 Posted November 16, 2007 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.
Guest026 Posted November 16, 2007 Author Posted November 16, 2007 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)
Cap'n Refsmmat Posted November 16, 2007 Posted November 16, 2007 Yes. cd to the place you stored the batch file, then just type out the name of the batch file and hit enter.
Dak Posted November 16, 2007 Posted November 16, 2007 @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.
Cap'n Refsmmat Posted November 16, 2007 Posted November 16, 2007 According to Google, pause will echo its own "Press any key" message.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now