English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm making a batch file so the computer can reply every time I type the command "Hello!" in the My Documents directory. My message goes like this:
Hello! Welcome back James!

I save it as Hello!.bat under my documents and go back to the DOS window. I change my directory to "My Documents" and type "Hello!" and it fills the entire screen with my file! What's wrong?

2006-09-23 23:34:20 · 3 answers · asked by geode_diamond_soul 1 in Computers & Internet Programming & Design

Well here's my excact text in the file I typed:
Hello! Welcome back James!

2006-09-23 23:45:59 · update #1

3 answers

it really simple you see the Hello!... text is forcing DOS to call the Hello batch continuously because "!" is seen as a wild card so the first bit of text in the line before it "Hello" is taken as a command forcing it to load the batch file again leaving you in an infinite loop

KBSoftware is right you should use the "echo" command for printing text on screen as it cannot call commands and batches

2006-09-24 03:15:28 · answer #1 · answered by Anonymous · 0 0

Have to see your source to tell you for sure where you did wrong. But if I'm basing your description alone. You never register the batch in windows on start up. You didn't have a command in the batch to receive the keyboard. For starters

2006-09-23 23:45:16 · answer #2 · answered by eternalvoid 3 · 0 0

i think you are typing "type hello!.bat" which is a command to print the files content on screen in dos........you shuld type "hellol!.bat" only without quotes

2006-09-24 00:50:58 · answer #3 · answered by DeAd MaN 4 · 0 0

fedest.com, questions and answers